美文网首页
git提交node-modules报文件名过长无法提交问题(转)

git提交node-modules报文件名过长无法提交问题(转)

作者: 会灰的大飞狼 | 来源:发表于2018-06-05 16:42 被阅读0次

    https://www.cnblogs.com/junwu/p/6004663.html

    http://245993596.iteye.com/blog/2317715

    • Update to msysgit 1.9 (or later)
    • Launch Git Bash
    • Got to your Git repository which 'suffers' of long paths issue
    • Enable long paths support with git config core.longpaths true

    当报如下错误时候

    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 true
    

    查看设置状态:

    git config core.longpaths
    

    相关文章

      网友评论

          本文标题:git提交node-modules报文件名过长无法提交问题(转)

          本文链接:https://www.haomeiwen.com/subject/zrhmsftx.html