如何删除TortoiseHg中的意外分支? [英] How to remove accidental branch in TortoiseHg?

查看:442
本文介绍了如何删除TortoiseHg中的意外分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(我是TortoiseHg的新手,所以请多多包涵:-)我在两台计算机上使用TortoiseHg与远程源存储库进行对话.我在一台机器上进行了更改,提交了这些更改,然后试图将它们推送到远程存储库,但是我首先忘记进行拉动才能首先获取最新代码.推送给了我几行输出,表明我可能忘记了先拉(true!),并提到了中止:推送创建了新的远程分支..."之类的东西.

(I am a relative newcomer to TortoiseHg, so bear with me :-) I use TortoiseHg on two machines to talk to my remote source repository. I made changes on one machine, committed them, and attempted to push them to the remote repository BUT I forgot to first do a pull to get the latest code first. The push gave me a few lines of output, suggesting I may have forgotten to pull first (true!) and mentioned something like "abort: push creates new remote branches...".

因此,我进行了一次拉动,这在资源库资源管理器中将几个节点添加到了图形的头部.问题是我尝试执行的推送现在显示为资源库资源管理器中的一个分支.从服务器端(codeplex)看,它没有显示我尝试推送的迹象,表明该意外分支仍然在我的计算机上.

So I did a pull, which added several nodes to the head of my graph in the repository explorer. The problem is that the push I tried to do is now showing as a branch in the repository explorer. Looking from the server side (codeplex), it shows no sign of my attempted push, indicating this accidental branch is still local on my machine.

如何删除此意外分支?我尝试在图中选择该节点,然后执行还原",但它似乎没有执行任何操作.我想知道,仅将本地目录树丢弃在本地计算机上,然后从服务器进行全新,干净的提取,是否最简单...?

How could I remove this accidental branch? I tried selecting that node in the graph then doing "revert" but it did not seem to do anything. I am wondering if it would be simplest to just discard my directory tree on my local machine and do a completely new, clean pull from the server...?

推荐答案

首先请确保已提交所有本地更改.然后通过调用hg merge合并分支并提交结果.

First make sure you have committed all your local changes. Then merge the branches by calling hg merge and commit the result.

这应该使您回到单个分支,重新组合两个头.

This should bring you back to a single branch, reuniting the two heads.

这篇关于如何删除TortoiseHg中的意外分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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