Git本地有未提交文件,直接拉取远端最新版本

先将本分支发Head重置至master

git checkout master 
git reset
--hard

git 强行pull并覆盖本地文件

git fetch --all  
git reset
--hard origin/master
git pull

 解决冲突:

Auto-merging Files
CONFLICT (content): Merge conflict in Files
Automatic merge failed; fix conflicts and then commit the result.

取消合并方法:

$ git status -sb


$ git merge --abort


$ git status -sb

猜你喜欢

转载自www.cnblogs.com/Jery-9527/p/11724182.html