合并 tortoiseHg 中的分支似乎不起作用

发布于 2024-10-09 04:34:36 字数 190 浏览 0 评论 0原文

在一个项目中,我有一个默认分支和另一个命名分支。合并两个分支并提交后,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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

海螺姑娘 2024-10-16 04:34:36

您收到该错误消息是因为指定分支及其所有更改集仍然存在于您的本地存储库中:您已将更改合并到 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):

Branch heads are changesets that have no child changeset on the same branch.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文