开发者

Rename default branch in TortoiseHG

Is it possible to rename 'default' to 'production' in T开发者_JS百科ortoiseHG?


You cannot rename a branch in Mercurial (or TortoiseHg for that matter). What you do instead is to start a new branch called production and base it on the current default branch.

You can do this in TortoiseHg 2.0, where you

  1. Click the row representing the working directory
  2. Click the branch button
  3. Click to open a new branch
  4. Fill in the branch name and click OK
  5. Enter a commit message and click Commit.

Rename default branch in TortoiseHG

This will create a new branch with the name production. The old default branch will remain and you can thus put new features there before merging them into production when they're stable.


You cannot do it directly from the Tortoise2.0+ settings, but through the command-line hg.
As documented in hgbook:

Mercurial lets you assign a persistent name to a branch.
There always exists a branch named default. Even before you start naming branches yourself, you can find traces of the default branch if you look for them.

To start working with named branches, use the hg branches command

$ hg branch production
marked working directory as branch production
$ hg branch
production

Check then if that change is reflected in TortoiseHg

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜