git在终端中显示目前分支名称
git在终端中显示当前分支名称
vim ~/.bashrc
add this code to the file
PS1='\[\033[01;34m\]\W''\[\e[33;40m\]$(__git_ps1 "(%s)")\[\033[01;32m\]\[\e[00m\]'" \$ "
source ~/.bashrc
michael(master) $