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