linux bash平台下查看linux分支
# .bash_profile
# 在.bash_profile加上以下两句
function git-branch-name {
git symbolic-ref --short -q HEAD 2>/dev/null
}
function git-branch-prompt {
local branch=`git-branch-name`
if [ $branch ]; then printf " [%s]" $branch; fi
}