0
我開始使用Git和我自己的Git服務。我創建了一個名爲WhereIsMyPi
的項目。如何解決Windows PowerShell中的「無法推送某些文件」錯誤?
這裏發生的事情:
Windows PowerShell Copyright (C) 2016 Microsoft Corporation. Alle Rechte vorbehalten. Das Laden von persönlichen und Systemprofilen dauerte 1986 ms. ~\Documents\GitHub [(unknown)]> cd C:\Users\Suriyaa\Downloads\WhereIsMyPi ~\Downloads\WhereIsMyPi [master]> git push origin master Counting objects: 5, done. Delta compression using up to 4 threads. Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 1.43 KiB | 0 bytes/s, done. Total 5 (delta 0), reused 0 (delta 0) remote: Skipping command-line '"C:\Program Files\Git\mingw64\bin\..\usr\bin\bash.exe"' remote: ('C:\Program Files\Git\mingw64\bin\..\usr\bin\bash.exe' not found) remote: Need a valid command-line; Edit the string resources accordingly remote: error: hook declined to update refs/heads/master To https://git.suriyaa.tk/SuriyaaKudoIsc/WhereIsMyPi.git ! [remote rejected] master -> master (hook declined) error: failed to push some refs to 'https://git.suriyaa.tk/SuriyaaKudoIsc/WhereIsMyPi.git' ~\Downloads\WhereIsMyPi [master]>
它正常工作,直到Git的報告,我沒有bash命令。這是錯誤輸出:
remote: Skipping command-line '"C:\Program Files\Git\mingw64\bin\..\usr\bin\bash.exe"' remote: ('C:\Program Files\Git\mingw64\bin\..\usr\bin\bash.exe' not found) remote: Need a valid command-line; Edit the string resources accordingly remote: error: hook declined to update refs/heads/master To https://git.suriyaa.tk/SuriyaaKudoIsc/WhereIsMyPi.git ! [remote rejected] master -> master (hook declined) error: failed to push some refs to 'https://git.suriyaa.tk/SuriyaaKudoIsc/WhereIsMyPi.git'
路徑C:\Program Files\Git\mingw64\bin\..\usr\bin\bash.exe
也不存在。我的實際bash命令在C:\Program Files\Git\mingw64\bin
!
我該怎麼辦?
使[hook](https://git-scm.com/book/gr/v2/Customizing-Git-Git-Hooks)指向正確的路徑? –
不是。 Git工作正常,但Bash是當前的問題。我需要一個有效的命令行來相應地編輯鉤子的字符串資源。 – Suriyaa