$ git config core.logallrefupdates true $ cat .git/logs/refs/heads/master $ git reflog show master|head -2 59a7f56 master;{0}: reset: moving to 59a7f56 2cfc8f7 master;{1}: reset: moving to HEAD^ $ git reset --hard master;{2} HEAD 现在位于 a1720b0 does master follow this new commit? $ git rev-parse HEAD a1720b04420a95d8f46d925569ab5d5d3ee5fd4a $ git reflog show master|head -3 a1720b0 master;{0}: reset: moving to master;{2} 59a7f56 master;{1}: reset: moving to 59a7f56 2cfc8f7 master;{2}: reset: moving to HEAD^