Tay Ray Chuan home archive

showing the current branch in git

Mon, 21 Jun 2010 00:58:35 +0800 | Filed under git

You're probably doing this:

$ git branch | grep \*
* master

Try this:

$ git rev-parse --symbolic-full-name HEAD
refs/heads/master

Substantial typing required, though.

blog comments powered by Disqus