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 !"

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM