当你要提交的远程git仓库及分支被别人更新了时候,要想提交自己的更新,先要同步别人的更新到本地:
git fetch origin mastergit log -p master..origin/mastergit merge origin/master
git pull origin master
git 使用之 更新本地仓库 git
原文:http://www.cnblogs.com/happyfish321/p/7073540.html