在terminal中显示git的分支信息

#
contrib / completion / git-completion.bash

#
 Source the git bash completion file
if [ -f ~/.git-completion.bash ]; then
    source ~/.git-completion.bash
    GIT_PS1_SHOWDIRTYSTATE=true
    PS1= ' [\u@\h:\W $(__git_ps1 "(%s)")]$  '
fi

你可能感兴趣的:(在terminal中显示git的分支信息)