How to branch with TortoiseHG

佐手、 提交于 2019-11-28 15:29:12
Chad Birch

As shown in the docs, all you should need to do is just click on the branch: default button near the top of the commit dialog, and change to a new branch name.

To start new branch with TortoiseHg press Commit... then, above Commit message press Branch, then "Open new named branch: "

Just wanted to add that in order to push new branch to remote repository there is a checkbox on the Synchronize tab under Options of "Allow push of a new branch" - you have to remember to turn it off again right afterwards.

Most of the time in mercurial, you clone the repository to make a branch.

You can then merge the separate repositories once you made your edits and commits.

This might sound like it would take up a lot of disk space but on most operating systems, mercurial will make hardlinks instead of copying the files. Anyway, disk space is normally cheap, and because it's local it's rather fast.

If you think about it, every "checkout" (in svn terminology) or "clone" (in mercurial terminology) is really a branch that will probably be merged back so it makes lots of sense that clones are the common way of making branches.

Before commiting, click on Branch button (see image), Then select a branch or create a new one (by typing where you select the branches).

See the image here

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