删除多个头 [英] Delete multiple heads
问题描述
C:\Users\Itu\workspace\Compiler>hg branches
default 13:aa6af82c5458
C:\Users\Itu\workspace\Compiler>hg heads
changeset: 13:aa6af82c5458
tag: tip
user: Itun
date: Sun Sep 18 22:27:06 2011 +0400
summary: Update 1.0.0.2
changeset: 9:d36e5ac454b1
parent: -1:000000000000
user: Itu
date: Sun Sep 18 06:50:25 2011 +0400
summary: New PR
changeset: 8:758cd394d82a
user: Itun
date: Sun Sep 18 06:48:17 2011 +0400
summary: asdasd
changeset: 4:c4c981b4ff43
user: Itun
date: Sun Sep 18 03:31:58 2011 +0400
summary: Update
C:\Users\Itu\workspace\Compiler>hg merge
abort: branch 'default' has 4 heads - please merge with an explicit rev
(run 'hg heads .' to see heads)
如何看到我有一个分支和四个头. 当我尝试插入eclipse mercurial插件时,它会向我返回有关多个头部的消息,并为我提供了重新设置或合并的基础.然后我什么都不懂,就把它关了. 我想我需要一些东西来删除这些头.如果有人可以向我解释一下并在eclipse插件中演示如何做到这一点,那就太好了,但其他帮助也值得赞赏.
How you can see I have the one branch and 4 heads. When I try to pull in my eclipse mercurial plugin, it returns me message about multiple heads and offers me to rebase or merge. Then I did not understand anything and closed it. I think I need something to delete this heads. It would be great if somebody could explain me this and show how to do this in the eclipse plugin, but other help is appreciated.
推荐答案
The safest way to remove the extra heads is to make a new clone, grabbing just the head you want with -r
:
cd C:\Users\Itu\workspace
mv Compiler Compiler-backup
hg clone -r aa6af82c5458 Compiler-backup Compiler
这将仅将aa6af82c5458
及其祖先移动到新克隆中,而将旧头保留在Compiler-backup
中.您以后总是可以hg pull
将它们保留下来,或者只是删除备份(丢失数据).
This will move just aa6af82c5458
and its ancestors to the new clone, leaving the old heads in Compiler-backup
. You can always hg pull
them over later, or just delete the backup (losing your data).
这篇关于删除多个头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!