git pull 强制覆盖本地

$ git fetch --all
$ git reset --hard origin/master
$ git pull
备注:

git fetch 只是下载远程的库的内容,不做任何的合并

git reset 把HEAD指向刚刚下载的最新的版本

猜你喜欢

转载自blog.csdn.net/qq_36184671/article/details/84957895