Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So i have a local clone and a central repository. Now I need to create local clones from the main clone and use them. The problem is the clone command is ignoring the ignored files (like it should).

But there are many configuration files in this case and I need a way for the local clone to copy everything, even the ignored files.

share|improve this question

You can infact just make a copy of the clone using your normal filesystem commands. In Linux this could look like:

$ cp -a repo repo-clone

That will create a perfectly file "clone" of your Mercurial repository. The differences between cp and hg clone are:

  • hg clone will reuse space on your harddisk by using "hard links" between the files in the .hg directory. This also makes hg clone faster for large repositories.

  • hg clone will also write a .hg/hgrc file with a default path pointing back to the source

  • hg clone will take care of locking the source and destination repositories as needed. This means that you must take care that noone is writing (pushing or committing) to the source while you copy it with cp.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.