指令就一行,更新很簡單,也不用再去手動找下載點囉!
git update-git-for-windows
posh-git 是整合 PowerShell 及 Git 的模組,它提供了整合資訊顯示在命令列中
先開啟 PowerShell 執行安裝模組 (範圍設定為目前的使用者)
Install-Module posh-git -Scope CurrentUser
回答都輸入 Y (是)
匯入 posh-git 模組
Import-Module posh-git
如此一來即可在 PowerShell 看到 Git 的狀態
若要永久使用,就把它加到自己的 Profile 設定去
Add-PoshGitToProfile
以後開 PowerShell 就可以繼續享用 posh-git 囉!
來囉~ 來囉~ Visual Studio Code 的擴充套件 PHPUnit Snippets 釋出囉!
套件介紹: PHPUnit Snippets
在使用 Git 執行遠端的操作時,若是自我憑證架的服務,可能會遇到顯示以下的錯誤
fatal: unable to access 'https://localhost/winnie/test.git/': SSL certificate problem: self signed certificate
解決方法: (註: 若不想全面開放就不要下這個指令,安全性也會降低,不建議採用此項!)
git config --global http.sslVerify false
單次不驗證:
GIT_SSL_NO_VERIFY=true git clone https://localhost/winnie/test.git
或是
git -c http.sslVerify=false clone https://localhost/winnie/test.git
然後在該 repository 下, 再下一次指定, 即未來此 repository 不需再做驗證
git config http.sslVerify false
剛好用新機器再度遇到問題,還是筆記一下備用!
2021-03-20 更新:
在版本 2.31.0.windows.1 版本,若採用全域開放 http.sslVerify 為 false 時,會出現下圖警告:(SECURITY WARNING - TLS certificate verification has been disabled!)
Git 在 2.14.0 已提供可選擇切換 Secure Channel 與 OpenSSL,我們即可使用 Windows 憑證設定 (建議使用)
git config --global http.sslBackend schannel
參考連結: