Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.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
中止PhpStorm中的Git合并 情况: 合并一个分支 合并时出错 我需要中止合并并重新开始_Git_Macos_Phpstorm - Fatal编程技术网

中止PhpStorm中的Git合并 情况: 合并一个分支 合并时出错 我需要中止合并并重新开始

中止PhpStorm中的Git合并 情况: 合并一个分支 合并时出错 我需要中止合并并重新开始,git,macos,phpstorm,Git,Macos,Phpstorm,我以前用于管理我的git存储库。我正在尝试使用PhpStorm来管理我的git回购,但它似乎缺少一些功能 在塔中有一个“中止”按钮,可以让我轻松地撤销混乱的合并并重新开始。只需单击“中止”按钮,它就会完全还原所有内容,就像您从未开始合并一样 用于Mac的塔中止合并按钮 问题: 有没有一种简单的方法可以中止/撤消PhpStorm中的合并?如果您只想撤消对单个文件的更改somefile,则可以尝试以下操作: git checkout -- path/to/somefile 如果您想撤消整个合并操

我以前用于管理我的git存储库。我正在尝试使用PhpStorm来管理我的git回购,但它似乎缺少一些功能

在塔中有一个“中止”按钮,可以让我轻松地撤销混乱的合并并重新开始。只需单击“中止”按钮,它就会完全还原所有内容,就像您从未开始合并一样

用于Mac的塔中止合并按钮

问题:
有没有一种简单的方法可以中止/撤消PhpStorm中的合并?

如果您只想撤消对单个文件的更改
somefile
,则可以尝试以下操作:

git checkout -- path/to/somefile
如果您想撤消整个合并操作,那么
git reset
将派上用场:

git reset --hard HEAD

这两个操作都在将状态重置为分支的
,这是您尝试合并之前的最后一次提交。

这是一个老问题。但仍然有一个可能发生在phpStrom中。 要中止合并,请转到“VCS”->“Git”->“重置磁头”并选择“硬”选项

您将丢失所有更改,因此请小心


合并是否实际完成(即是否存在合并提交),或者是否存在尚未解决的合并冲突?合并冲突未完成。仍有一些冲突需要解决。我只是错误地解决了一个问题,并希望重新开始合并。我认为问题的原因是,如果phpstormgui中有任何按钮,那么获取信息是什么。意味着基本问题是“phpstorm中是否有任何gui按钮使其与
git merge--abort
类似。这是有原因的,请看我上面的评论。您的解决方案回答了如何在命令行上中止的问题,但问题是,如何在phpstorm中中止。这意味着你没有回答@zeckdcHey@JJJ的问题。谢谢你的帮助!:-)