合并 tortoiseHg 中的分支似乎不起作用
在一个项目中,我有一个默认分支和另一个命名分支。合并两个分支并提交后,TortoiseHg 中的图表显示两个分支已合并。但是,推送到远程存储库(处于分支之前的阶段,它只有默认分支)时,我收到消息“中止:推送创建新的远程分支”。
如果我没记错的话,合并后只剩下一个分支,为什么会出现这个错误消息呢?注意:图表仍然显示我有 2 个头,这与此有什么关系吗?
In a project, I have a default branch and another named branch. After a merging both branches and committing it, the graph in TortoiseHg shows that both branches have been merged. However, pushing to a remote repository (which is at the stage before branching, it only has the default branch), I get the message "abort: push creates new remote branches".
If I'm not mistaken, I'm left with one branch after merging, so why this error message? Note: the graph still shows that I have 2 heads, is it in anyway related to this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您收到该错误消息是因为指定分支及其所有更改集仍然存在于您的本地存储库中:您已将更改合并到
default
分支中,仅此而已。您会看到两个头,因为您使用的是命名分支:来自帮助文本 for
hg Heads
(命令行相当于在存储库资源管理器中选择Heads):由于您的本地存储库中有两个分支(默认分支和命名分支),因此根据定义您有两个头。
要解决您收到的错误消息,在存储库资源管理器中,同步菜单底部有一个推送新分支选项;选择它,然后您应该能够推送到远程存储库。
You're getting that error message because the named branch -- and all its changesets -- still exists in your local repository: you've merged the changes into the
default
branch, that's all.You see two heads because you're using a named branch: from the help text for
hg heads
(the command line equivalent of selecting Heads in the repository explorer):Since you have two branches in your local repository (
default
and the named branch), you have two heads by definition.To resolve the error message that you're getting, in the repository explorer, there's a Push New Branch option at the bottom of the Synchronize menu; select it, then you should be able to push to the remote repository.