Daniel Cohen talks shop
Show the Current GIT Branch and Tag in Your Command Prompt
Following Eran’s post on showing current git branch, here is an improved version including branch or tag number (which is helpful in repositories like nodejs) .
in order to differentiate between branches and tags the script prints branches in braces () and tags in square braces [].