git 添加node_modules文件夹报错: filename too long

使用git add node_modeles 添加文件夹报错,报错信息:

----fatal: unable to stat 'node_modules/gulp-connect/node_modules/gulp-util/node_modules/dateformat/node_modules/meow/node_modules/normalize-package-data/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse/parser.generated.js': Filename too long

解决办法:

git config --system core.longpaths true

查看设置状态是否修改成功

git config core.longpaths
ture

再次添加成功。
原文地址:https://www.cnblogs.com/guojuboke/p/10891582.html