水银:使一个分支与另一个分支相同 [英] Mercurial: make one branch identical to another

查看:65
本文介绍了水银:使一个分支与另一个分支相同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与另一个相对较新的开发人员一起工作.为了让我可以对她的工作进行代码审查,我让她创建了一个分支,如果我对所做的更改感到满意,可以对其进行审查并定期合并.

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.

那么我如何使分支B与分支A完全相同?

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

推荐答案

(简单的好奇心:如何分居"该分支?)

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

您可以关闭当前的代码检查分支,然后使用--force启动另一个具有相同名称的分支.

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

这篇关于水银:使一个分支与另一个分支相同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆