From: Karl Chen Date: Fri, 02 Jan 2009 03:28:12 GMT Subject: git-branch --print-current Message-ID: How about an option to git-branch that just prints the name of the current branch for scripts' sake? To replace: git branch --no-color 2>/dev/null | perl -ne '/^[*] (.*)/ && print $1'