我突然遇到一个奇怪的问题,我的git-bash似乎已停止工作。直到昨天它运行良好,然后突然之间我尝试进行合并,尝试进行git mergetool
,但它给了我错误git-mergetool cannot be used without a working tree
。谷歌搜索后,我通过执行git worktree list
检查了我的工作树,它给了我响应:
c:\iris-i\client-repo>git worktree list
c:/iris-i/client-repo 8323fb1d8 [js/ui/timestampFormatting]
我还注意到,即使当我在git存储库中时,分支名称也突然消失了,所以我决定尝试重新安装它,安装后我在使用git-时收到与上述相同的消息CMD,但我不再可以在git bash中使用git。当我尝试运行git
或git --version
时,不再获得任何控制台输出,由于某种原因,似乎只有错误输出通过管道传输到了流中,因为如果我执行类似git asdf
的操作,我得到回应:
如果我尝试使用git-bash运行git mergetool
,则会收到错误/git-sh-i18n: No such file or directory
我还安装了乌龟git,因此我尝试使用它,但是如果我尝试使用以下命令之一,它也会给我错误:git.exe not correctly set up () Check TortoiseGit settings and consult help file for "Git.exe Path"
和错误You have an old unsupported version of Git installed. You should consider an upgrade to 1.9.5+.
(尽管我安装的版本是2.17.1)。如果我尝试在设置中检查git exe路径,则会收到此错误:
我尝试卸载所有的git程序,只为最新版本的Windows安装git,但是我仍然遇到相同的问题。我尝试删除.gitconfig,但这似乎没有任何区别。我正在寻找有关如何调试问题的任何建议,因为重新安装似乎无济于事,现在我唯一的其他想法是重新格式化,我显然想避免... >
编辑: git CMD中的路径输出:
Path=C:\Program Files\Git\cmd;C:\Program Files (x86)\Common Files\Oracle\Java\ja
vapath;C:\ProgramData\Oracle\Java\javapath;C:\orant\bin;C:\windows\system32;C:\w
indows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\P
rogram Files\IBM\Infoprint Select;C:\Program Files (x86)\IBM\Personal Communicat
ions\;C:\Program Files (x86)\IBM\Trace Facility\;C:\Users\ADMIN.dnx\bin;C:\
Program Files\Microsoft DNX\Dnvm\;c:\notes;C:\Program Files\Microsoft Windows Pe
rformance Toolkit\;C:\Program Files (x86)\Meld;C:\Program Files\IBM\WebSphere MQ
\bin64;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\t
ools\c\samples\bin;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\KDiff3;C
:\Program Files\IDM Computer Solutions\UltraEdit;C:\Program Files\nodejs\;C:\Pyt
hon27;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\Wirel
essCommon\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Git\cmd;C:\Us
ers\ADMIN\AppData\Roaming\npm;C:\Program Files\Microsoft VS Code\bin;C:\Prog
ram Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:
\Users\ADMIN\AppData\Local\Box\Box Edit\
git bash中路径的输出:
PATH=/c/Users/ADMIN/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/ADMIN/bin:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/ProgramData/Oracle/Java/javapath:/c/orant/bin:/c/windows/system32:/c/windows:/c/windows/System32/Wbem:/c/windows/System32/WindowsPowerShell/v1.0:/c/Program Files/IBM/Infoprint Select:/c/Program Files (x86)/IBM/Personal Communications:/c/Program Files (x86)/IBM/Trace Facility:/c/Users/ADMIN/.dnx/bin:/c/Program Files/Microsoft DNX/Dnvm:/c/notes:/c/Program Files/Microsoft Windows Performance Toolkit:/c/Program Files (x86)/Meld:/c/Program Files/IBM/WebSphere MQ/bin64:/c/Program Files/IBM/WebSphere MQ/bin:/c/Program Files/IBM/WebSphere MQ/tools/c/samples/bin:/c/Program Files (x86)/Skype/Phone:/c/Program Files/KDiff3:/c/Program Files/IDM Computer Solutions/UltraEdit:/c/Program Files/nodejs:/c/Python27:/c/Program Files/Intel/WiFi/bin:/c/Program Files/Common Files/Intel/WirelessCommon:/c/Program Files/Microsoft VS Code/bin:/cmd:/c/Users/ADMIN/AppData/Roaming/npm:/c/Program Files/Microsoft VS Code/bin:/c/Program Files/Intel/WiFi/bin:/c/Program Files/Common Files/Intel/WirelessCommon:/c/Users/ADMIN/AppData/Local/Box/Box Edit:/usr/bin/vendor_perl:/usr/bin/core_perl