修改Windows下git-bash显示样式

参考以下链接:

https://gist.github.com/justintv/168835

vim ~/.bash_profile
编辑profile文件, 修改PS1

# vim ~/.bash_profile
#//在此文件中插入下面这句
export PS1="\u@windows:w$(__git_ps1 '(%s)')$ "
编辑完成保存后, 执行

source ~/.bash_profile

具体配置如下:

export PS1="[e[37;40m][e[32;40m]u[e[37;40m]@W[e[33;40m]$(__git_ps1 ['%s'])[e[32;40m]$[e[0m] "

原文地址:https://www.cnblogs.com/liuxgcn/p/13079824.html