git pull aborted with error filename too long


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 and it aborted with “filename too long” errors of 3rd party code.

What can I do?


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.

Leave a Reply