windows 运行shell bash .sh文件 和 git sh: __git_ps1: command not found 报错解决办法

0、安装git,可以运行bash,应该是linux的powershell脚本

1、

参考 https://juejin.cn/post/6844904051868450823   

sh __git_ps1 command not found windows git-bash报错

 

 

 

2、说明

上面截图的 bash.bashrc  目录

E:\Program Files\Git\etc\bash.bashrc

上面截图的 git-prompt.sh  目录是

E:\Program Files\Git\etc\profile.d\ git-prompt.sh

 

3、写一个helloworld测试

#!/bin/bash
echo "Hello World !"

 

posted @ 2022-02-17 17:07  hjswlqd  阅读(1494)  评论(0编辑  收藏  举报