Windows上的GIT问题(文件名或扩展名太长) [英] GIT Issue on Windows (The filename or extension is too long)
问题描述
概述:
只需在Windows 7平台上安装GIT版本2.20.1-64位.Git在GIT Bash上运行良好;但是,Windows CMD或Powershell上的任何git命令都会引发文件名或扩展名太长错误.
详细信息:
- GIT版本:2.20.1-64位
- 平台:Windows 7
疑难解答:
我尝试根据
问题:
通过Windows CMD或诸如IntelliJ Idea之类的第三方应用程序执行的任何Git命令都会引发以下错误:
-
CMD:
-
IntelliJ:
请为我提供您真正的解决方案.
首先尝试使用简化的路径和便携式Git(例如Filename too long in Git for Windows. I also googled to find other solutions but all recommended the same approach which was updating the git config.
- The GIT config file updated with
git config --system core.longpaths true
Issue:
Any Git command via Windows CMD or 3rd party apps like IntelliJ Idea raises the following error:
CMD:
IntelliJ:
Please advise me with your genuine solutions.
Try first to use a simplified PATH and a portable Git (like PortableGit-2.20.1-64-bit.7z.exe
) uncompressed anywhere you want.
set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%
Then check if the issue persists in that CMD session, where you have set said simplified PATH.
这篇关于Windows上的GIT问题(文件名或扩展名太长)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!