[小技巧] git: Your branch and 'origin/master' have diverged

本文参考:http://stackoverflow.com/questions/19864934/git-your-branch-and-origin-master-have-diverged-how-to-throw-away-local-com

如果不需要保留本地的修改,只要执行下面两步:

git fetch origin
git reset --hard origin/master

你可能感兴趣的:(版本管理工具)