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

xingyun86 2019-7-17 1374

1.下载git-prompt.sh

https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh

2.拷贝到/etc/profile.d/目录下,替换原来旧的

3.在/etc/bash.bashrc文件中末尾增加如下内容

source /etc/profile.d/.git-prompt.sh

4.解决问题


×
打赏作者
最新回复 (0)
只看楼主
全部楼主
返回