Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6092629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:27:53+00:00 2026-05-23T12:27:53+00:00

How can I clone a Mercurial repository without the .hg folder to save time

  • 0

How can I clone a Mercurial repository without the .hg folder to save time (the project is big)? I only need the tip files.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:27:53+00:00Added an answer on May 23, 2026 at 12:27 pm

    The .hg directory is what stores your complete repository information. That is, information about all your files and their revisions tracked by the repository. As for storage, it usually is pretty efficient since it is compressed using binary differerencing.

    When you clone a repository, the only thing that is cloned is the .hg directory. The working copy you will get after the clone is retrieved from that .hg.

    If all you want to store is the repository information (say on a server), you can remove the working copy with hg update null.

    If you want to create a clone of your repository without the revision information, you can use the hg archive command (see reference below). Be aware that this copy is just a “working copy” (to use some common svn terminology). You can’t commit, nor do any other mercurial operation with it.

    hg archive [OPTION]… DEST

    create unversioned archive of a
    repository revision

    By default, the revision used is the parent of the working
    directory; use "-r" to specify a different revision.
    
    To specify the type of archive to create, use "-t". Valid
    types are:
    
    "files" (default): a directory full of files
    "tar": tar archive, uncompressed
    "tbz2": tar archive, compressed using bzip2
    "tgz": tar archive, compressed using gzip
    "uzip": zip archive, uncompressed
    "zip": zip archive, compressed using deflate
    
    The exact name of the destination archive or directory is given
    using a format string; see "hg help export" for details.
    
    Each member added to an archive file has a directory prefix
    prepended. Use "-p" to specify a format string for the prefix.
    The default is the basename of the archive, with suffixes removed.
    

    options:

    --no-decode  do not pass files through decoders  -p --prefix    
    

    directory prefix for files in archive
    -r –rev revision to distribute -t –type type of distribution to create -I –include include
    names matching the given patterns -X
    –exclude exclude names matching the given patterns

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can you clone a Mercurial repository as of a specific changeset? Ie: If
How can I determine if my displays are in Clone Mode without using either
Let's say I clone a remote Mercurial repository (over the local network or even
Is it possible to clone part of a Mercurial repository? Let's say the repository
When cloning a repository with mercurial you can pass the -U/--noupdate flag to create
Using Git or Mercurial, if the working directory is 1GB, then the local repository
I have a local machine (laptop) and a shared Mercurial repository on another machine
I maintain a project that is versioned with Mercurial and managed with Maven. When
I'm in a small distributed team using Mercurial for a central repository. We each
I have a client's Django project that I'm developing locally, using Mercurial for version

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.