Return to Snippet

Revision: 33618
at October 11, 2010 03:31 by arunpjohny


Initial Code
branch=$( git branch 2>/dev/null|grep -e ^* | tr -d \*\ )

Initial URL

                                

Initial Description
git branch will give us all the branches in the current repository and the current branch will be denoted by a * mark.

Initial Title
How to get the current git branch

Initial Tags
git

Initial Language
Bash