简体   繁体   English

如何从Mercurial中的默认分支创建新分支?

[英]How can I create new branch from default branch in Mercurial?

I have the branch name default which is my production branch. 我的分支名称default为生产分支。 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 . 这会将您的工作代码切换到一个名为* Name_Of_Branch *的分支- 注意 ,直到您执行hg commit ,该分支才会在本地存储库中存在,直到您执行hg push (或接受的拉取) ,该分支才会存在于其他任何人请求管理员) ,他们已经完成了hg pull

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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