7

i´ve installed TortoiseHg with Mercurial. Another programmer of our department created a "normal" hg repo a few months ago. Now I have to change this repo into a "bare" one. Is this even possible?

prototype0815
  • 592
  • 2
  • 7
  • 24
  • 1
    duplicate of https://stackoverflow.com/questions/4158726/how-can-i-remove-the-working-copy-from-a-mercurial-clone – David Cary Oct 25 '17 at 16:59

1 Answers1

14

To create a bare repo when cloning use the no update flag when cloning i.e. hg clone --noupdate ...

To convert to a bare repo update to the "null" branch use hg update null

  • that works fine for me, thank you. "hg update null" on central repo deletes all files, excepting the ".hg" directory. – prototype0815 Dec 15 '14 at 09:15
  • 3
    Good answer! Small detail: `null` is not a branch, is the changeset before the first changeset you make (the ancestor of the first revision). – Martin Geisler Dec 15 '14 at 15:04