A friend of mine tweeted recently about how they got into such a git mess that they deleted the entire repo and re-cloned it. I know I've done that in the past so I thought I would share a neat git feature that isn't widely known: git can understand temporal strings.
For example say you are working on a branch for an hour and you completely mess it up, knowing an hour ago you were in a good place you could issue this command git reset --hard @{'1 hour ago'} . You can use all sorts of temporal langauge e.g. hours, minutes, seconds, weeks, months, years. You can even combine them git reset --hard @{'1 year 3 months 5 hours ago'}.