git reflog
git reflog
shows you every commit that has been active in your current (local) git repositoy, in order. In other words, you can easily find out what commit you were on 10 commits ago, or just before you started rebasing the last time, etc. git reflog
even shows the commits that are applied in order during a rebase.
Important Note
git reflog
only shows commits, so if you don’t commit, you won’t be able to get back to the state you are in right now. This is one of the reasons why it’s important to commit often and with atomicity/granularity.
Remember that commits are cheap (free!) and you can create as many as you want. If your commits end up being too granular, you can always squash them together using git rebase.