关于gitbash一直报:sh: __git_ps1: command not found的解决办法

 

curl -o ~/.git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh

 

然后在~/.bashrc或者~/.bash_profile文件中增加如下内容

source ~/.git-prompt.sh

 

如何设置bash命令行显示git分支名称,请查看我的另一篇博文 http://www.cnblogs.com/tang9018/p/7390297.html

posted @ 2017-08-18 16:10  小四叶草  阅读(2292)  评论(0编辑  收藏  举报