vi .bashrc
copy https://github.com/wdy331644741/git/tree/master/contrib/completion 两个文件
source ~/.git-completion.bash
#
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWCOLORHINTS=true
if [ -f ~/.git-completion.bash ]; then
source ~/.git-prompt.sh
PROMPT_COMMAND='__git_ps1 "[\t][\u@\h:\w]" "\\\$ "'
fi