我正在与另一位相对较新的开发人员合作。 为了让我对她的工作进行代码审查,我让她创建了一个分支,我可以查看并定期合并,如果我对这些变化感到满意的话。
那个分支已经被软管了,所以我只想“重置”它,以便它与主线相同,所以她可以从干净的代码重新开始。
我可以创建一个新分支,但我想保留相同的名称,避免创建不必要的副本。
那么如何使分支B与分支A完全相同?
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?
最满意答案
(简单的好奇心:那个分支是如何被“h”的?)
您可以关闭当前的代码审查分支,然后使用--force以相同的名称启动另一个分支。
hg com --close-branch -m "closing" hg branch "same_name" --force(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更多推荐
发布评论