mercurial - 在 mercurial 中关闭一个分支/头

标签 mercurial

 >hg branches
 default                      210:87d8059250ce

和两个头
hg heads
changeset:   1:87d8059250ce
tag:         tip
user:        me
date:        Tue Apr 12 18:33:24 2011 -0700
summary:     old one

changeset:   2:fa5abf8b578a
user:        me
date:        Tue Apr 12 18:13:19 2011 -0700
summary:     new one

我想关闭 head 1 并且只使用 head 2。我该怎么做?我怎样才能找出这与哪个分支相关联?

我见过这种方法:
 hg up -r 1
 hg ci --close-branch

但是当我去推送时,它会提示“你忘记 merge 了吗?使用 push -f 来强制”。我不知道为什么它会问我这个问题,因为我想覆盖我刚刚用这个新头拉出的更改...... rev 2。

让我知道如何做到这一点!谢谢你!!!

最佳答案

这为我解答了。谢谢Mercurial: beheading a head

关于mercurial - 在 mercurial 中关闭一个分支/头,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5643600/

相关文章:

mercurial - Windows 10 上的 Tortoisehg Workbench 打不开

mercurial - 如何为 hudson/jenkins 设置私有(private) ssh key 来访问 bitbucket?

version-control - 获取 'hg import' 使用内部 :merge

mercurial - 修复 Mercurial 中失败的完整性检查?

Mercurial: merge 未提交的更改?

mercurial - 在 mercurial 中,有没有办法禁用所有配置(系统、用户、存储库)?

Mercurial:如何创建计划外的分支

mercurial - 将 Mercurial 存储库克隆到非空目录中

git - 如何将 Mercurial 存储库转换为 Git(支持 LFS)?

windows-7 - TortoiseHg:覆盖图标问题(Windows)?