开发者

How to merge branches and specific 'bugfix' changesets across branches?

开发者 https://www.devze.com 2023-03-27 21:56 出处:网络
I am fairly new to mercurial and version control in general. I am using bitbucket and TortoiseHg. I wanted to manage my project with one stable and one dev branch. Making a branch named \'dev\' was ea

I am fairly new to mercurial and version control in general. I am using bitbucket and TortoiseHg. I wanted to manage my project with one stable and one dev branch. Making a branch named 'dev' was easy. Now I am about to finish current iteration and hence want to merge the dev branch into the 'default' branch. I have tried searching but to no avail.

Also I would like to confirm it again. Merging my dev branch into stable means my stable code will be replaced with the newer dev code, right? Also what should I do? Should I make a completely diffrent repo for dev or branch it in the same repo? A different repo means I can fix bugs in one and 'pu开发者_运维技巧sh' it into the other. But can the same be done with branches? if yes then how?


If stable and dev are named branches in the same repository, then to merge dev into stable, you switch to stable and do a merge:

$ hg up stable
$ hg merge dev

You might want to check out the docs for hg resolve in case there are merge conflicts that can't be resolved.


About moving a specific changeset to another branch you might want to check out hg transplant

0

精彩评论

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