git pull更新错误解决办法

git pull error

1
2
Your local changes to the following files would be overwritten by merge
error: Your local changes to the following files would be overwritten by merge:

保存更改

1
2
3
git stash
git pull
git stash pop

然后可以使用git diff -w +文件名 来确认代码自动合并的情况.

完全覆盖本地工作

1
2
git reset --hard
git pull

其中git reset是针对版本

热评文章