LoginSignup
4
4

More than 5 years have passed since last update.

どこにコミットしたかわからなくなったら、 git reflog を使うと良い

Last updated at Posted at 2016-10-26

あれ、どんな操作したっけ。。

そんな時は、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を修正
...
4
4
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4