How do I have more than one workspace with Mercurial (hg)?

狂风中的少年 提交于 2019-12-02 08:31:33

Mercurial supports this model better than most Version Control Systems.

The trick is that you can have multiple repositories of the same code on your machine. Each repository supports one working directory, where you will keep your code.

You can move changes between the repositories, or from these to repositories on other machines, such as a central repo.

A Mercurial user might read your statement "I also like to checkout to a clean workspace after I have done a check...." as "I would like to clone a new copy of the repository after I have committed my checked code." And this is easily done.

  • hg clone URL dir1
  • hg clone URL dir2

... hack-debug-fix] ...

  • hg commit
  • hg push
  • cd ...
  • del dir*
Ian Ringrose

Anther option is the Share Extension, distributed with Mercurial 1.3 or later.

See Does mercurial (hg) have functionality similar to git’s worktree?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!