git pull aborted with error filename too long

前端 未结 7 1305
有刺的猬
有刺的猬 2020-12-07 08:11

I\'m using Windows as my OS, and working on a project with a friend who\'s using a Mac. He checked in code to our Github.

I was trying to git pull everything he did

7条回答
  •  心在旅途
    2020-12-07 08:52

    The msysgit FAQ on Git cannot create a filedirectory with a long path doesn't seem up to date, as it still links to old msysgit ticket #110. However, according to later ticket #122 the problem has been fixed in msysgit 1.9, thus:

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

    So far, it's worked for me very well.

    Be aware of important notice in comment on the ticket #122

    don't come back here and complain that it breaks Windows Explorer, cmd.exe, bash or whatever tools you're using.

提交回复
热议问题