git-bash - The solution to the problem that gitbash keeps reporting: sh: __git_ps1: command not found
滿天的星座
滿天的星座 2017-05-02 09:36:06
0
1
1065

Use the set command to set the environment variable of docker,
and then gitbash will always report sh: __git_ps1: command not found.

After searching, there is no similar solution.

滿天的星座
滿天的星座

reply all(1)
左手右手慢动作

If you find inspiration on stackoverflow, just go gitbash的安装目录Gitetc搜寻了一番,找到了如下文件:
bash.bashrc

There is such a line in it

# Set a default prompt of: user@host, MSYSTEM variable, and current_directory
# PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n$ '

I removed the # in front of PS1 and then entered sh, and no error was reported

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template