Extract git branch name function for bash