I’ve been using git a lot recently but probably only about 10% of it; just enough to enable me to do what I need in order to manage several different lines of development. The Rubyist has a few git tricks in it that I really like. Here are a few that were new to me.
Your local git history is called the reflog
You can find individual commits locally by specifying the branch and a time:
$ git show master@{yesterday}
Or go back in sequence:
$ git show master@{5}
The rev-parse command, returning the SHA value of the commit:
$ git rev-parse master
671d9744cdfc8cd98fc7a3c31fac394ae7f564a9
Handy.
blog comments powered by Disqus