Windows下面使用git拉取或者提交项目时,遇到长路径提示file name too long的解决方案
场景:windows下面使用idea从码云上面拉取代码时报错:
fatal: unable to stat '****/***/******/****/*****/****/****.**': Filename too long。这个错误是git报的错。(加红是一个文件路径)
在项目所在目录下面运行以下命令即可,我是用的第一种(鼠标右键--> Git Bash Here --> git config --system core.longpaths true)
可以使用以下命令来修复:
git config --system core.longpaths true
也可以仅设置当前项目:
git config core.longpaths true
查看设置状态:
git config core.longpaths