Mercurial clone from a branch

Abidi picture Abidi · Dec 28, 2010 · Viewed 44.2k times · Source

We have a repository with three named branches, I wanted to clone one of the branches. Is there a mercurial command to do that? If I provide the path (of branch) with hg clone I get 404 error.

Answer

Benjamin Pollack picture Benjamin Pollack · Dec 28, 2010

hg clone http://your/repo -r branchname should do the trick.