Git You have not concluded your merge. (MERGE_HEAD exists)

You have not concluded your merge. (MERGE_HEAD exists)

本地有修改和提交,如何强制用远程的库更新。
出现这种情况一般是git本地有commit,但是不能更新,也不能cleanup,导致无法push到服务器。

使用git pull -f 强制更新,仍然提示 You have not concluded your merge. (MERGE_HEAD exists)。

这种情况,可以做好备份,放弃本地修改,用远程内容reset本地目录,当然新建目录重新clone也可以。

以下是使用reset命令使用远程内容强制更新本地目录,
git fetch 下载远程的库的内容,不做任何的合并,git reset 把HEAD指向刚刚下载的最新的版本。
注意,这样操作,之前所做的修改会被覆盖!!!谨慎使用!

git fetch --all

git reset --hard origin/master(根据本地版本)

你可能感兴趣的:(工具)