Mercurial: make one branch identical to another

不打扰是莪最后的温柔 提交于 2019-12-06 04:21:36

问题


I'm working with another developer who's relatively new. In order to allow me to do code review on her work, I had her create a branch which I can review and periodically merge if I am happy with the changes.

That branch has gotten hosed, so I just want to "reset" it, so that it's identical to the mainline, so she can start again from clean code.

I could create a new branch, but I'd like to keep the same name and avoid creating unnecessary copies.

So how do I make branch B exactly the same as branch A?


回答1:


(Simple curiosity: how has that branch been "hosed"?)

You can close the current code review branch, then start another with the same name with --force.

hg com --close-branch -m "closing"
hg branch "same_name" --force


来源:https://stackoverflow.com/questions/13092020/mercurial-make-one-branch-identical-to-another

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!