TortoiseHg 和一个仓库中的多个分支
我实在想不通。我是 Mercurial 和 TortoiseHg 的新手。阅读了大量文档,仍然找不到答案。我知道分支的一种方法是制作副本。这很清楚,但还有另一种方式称为“命名分支”,但这是我无法理解的一件事。
例如,我有新的存储库第一个分支称为“默认”。然后我添加了 3 个名为“test1...3”的分支。现在在回购浏览器中我有这样的树:
* test3
|
* test2
|
* test1
|
* default
如何实现这样的事情:
* test 1
| _______* test 2
| | ______* test 3
| ||
|//
* default
如何在分支到“branch3”后切换回“默认”。添加一些内容并提交并切换回“branch3”后?
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"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您还需要 TortoiseHG 中的建议 - 那么您必须打开存储库资源管理器并为您有兴趣切换到的分支的负责人选择“更新”。
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.
您应该
在每个命名分支创建之间创建一个。
请注意
-C
选项,该选项也会丢弃本地更改,因此在使用此命令之前要小心。You should make a
between each named branch creation.
Beware of the
-C
option, which also discards local changes, so be careful before using this command.