TortoiseHg and multiple branches in one repo

喜你入骨 提交于 2019-12-06 18:50:08

问题


I really can't figure it out. I'm new to Mercurial and TortoiseHg. Read alot of docs and still cant find answer. I know that one way of branching is making a copy. Thats clear but there is another way called "named branches" but this is one thing i can't understand.

For example i I have new repo first branch is called "default". Then i added 3 branches called "test1...3". Now in repo browser i have tree like this:

* test3
|
* test2
|
* test1
|
* default

how to achieve something like this:

* test 1 
|  _______* test 2
| | ______* test 3
| ||
|//
* default

How to after branching to "branch3" switch back to "default". After adding some things and commit and switch back to "branch3"?


回答1:


If you need an advice in TortoiseHG specifically too - then you have to open repository explorer and choose "update" for the head of branch you are interested to switch to.




回答2:


You should make a

hg update -C default

between each named branch creation.

Beware of the -C option, which also discards local changes, so be careful before using this command.



来源:https://stackoverflow.com/questions/3263823/tortoisehg-and-multiple-branches-in-one-repo

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