Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Version control hg push--新分支到错误分支_Version Control_Mercurial - Fatal编程技术网

Version control hg push--新分支到错误分支

Version control hg push--新分支到错误分支,version-control,mercurial,Version Control,Mercurial,我从mybranch创建了一个新的bug fix分支,但在我提交并进行编辑后,它似乎想将其推送到另一个分支 那么,为什么我的push-new分支会转到错误的分支,而我没有从中编辑修复分支 要检查是否在本地存储库中创建了新分支,可以使用以下命令: $> hg branches 要更改本地存储库中的分支,可以使用: $> hg branch <branch_name> 在hg log-graph-l10的结果中,你的描述是神秘的。hg push-new branch不会创

我从mybranch创建了一个新的bug fix分支,但在我提交并进行编辑后,它似乎想将其推送到另一个分支

那么,为什么我的push-new分支会转到错误的分支,而我没有从中编辑修复分支

要检查是否在本地存储库中创建了新分支,可以使用以下命令:

$> hg branches
要更改本地存储库中的分支,可以使用:

$> hg branch <branch_name>

在hg log-graph-l10的结果中,你的描述是神秘的。hg push-new branch不会创建另一个分支,它只允许在本地提交中创建新分支时进行推送。-1,因为没有参数的推送甚至无法工作。既然已经创建了一个新的分支,它将总是在没有-new-branch的情况下中止。下面的评论虽然你说的是真的,但它绝对不能回答这个问题。。。顺便说一下,您还可以添加hg branch来标识当前分支,因为这实际上可能会带来一些关于其提交位置的线索。否则,hg分支将列出所有这些分支,甚至是错误的分支,这些分支可能不是来自于hg分支,如果提交已经完成,那么更改分支又有什么意义呢?