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
- Click the row representing the working directory
- Click the branch button
- Click to open a new branch
- Fill in the branch name and click OK
- Enter a commit message and click Commit.
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
精彩评论