あれ、どんな操作したっけ。。
そんな時は、git reflog
を使いましょう。
過去のあらゆる操作のログを見ることができます。
$ git reflog
9f8f762 HEAD@{0}: checkout: moving from 9f8f7627cc40f35ef3c07cb5447240e46aa990f7 to xxxxx
9f8f762 HEAD@{1}: checkout: moving from xxxx to 9f8f762
9f8f762 HEAD@{2}: checkout: moving from master to xxxx
91b6ca2 HEAD@{3}: pull: Fast-forward
70ae6c6 HEAD@{4}: checkout: moving from xxxx to master
9f8f762 HEAD@{5}: commit: xxxxxxxを修正
...