解决方案已经在这里提到# work on local mastergit checkout master# reset to the previous state of origin/master, as recorded by refloggit reset --hard origin/master@{1}# at this point verify that this is indeed the desired commit.# (if necessary, use git reflog to find the right one, and# git reset --hard to that one)# finally, push the master branch (and only the master branch) to the servergit push -f origin master