You have not concluded your merge (MERGE_HEAD exists)

使用SourceTree Merge分支的时候出现问题:

You have not concluded your merge (MERGE_HEAD exists). Please, commit your changes before you can merge.

然后点击SourceTree的Termianl的时候出现错误:

You have not concluded your merge (MERGE_HEAD exists)_第1张图片

You have not concluded your merge (MERGE_HEAD exists)_第2张图片

错误可能是因为在你以前pull下来的代码没有自动合并导致的.

有2个解决办法:

1.保留你本地的修改

git merge --abort

git reset --merge

合并后记得一定要提交这个本地的合并

然后在获取线上仓库

git pull

2.down下线上代码版本,抛弃本地的修改

不建议这样做,但是如果你本地修改不大,或者自己有一份备份留存,可以直接用线上最新版本覆盖到本地

git fetch --all

git reset --hard origin/master

git fetch

当然还有一个最笨的方法,就是重新clone一份代码,抛弃这个工作目录,方法很笨拙但是效果一样的好。

你可能感兴趣的:(git,合并,merge,MERGE-HEAD)