简体   繁体   中英

How can I create new branch from default branch in Mercurial?

I have the branch name default which is my production branch. Now I want to create development branch from there and work separate on it.

How can I do that without affecting my default branch

Commit or shelve all your current changes, then:

hg branch Name_Of_Branch

This will switch your working code to a branch called *Name_Of_Branch* - NB this branch will not exist in the local repository until you do a hg commit and will not exist for anybody else until you have done a hg push , (or an accepted pull request to an administrator) , and they have done hg pull .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM