How To Fix Filename Too Long Error When Use Git On Windows 10

I use Sourcetree to manage my example project source files on windows 10, and it uses a git version control system. But when I commit or merge my project files, it shows a Filename too long error. After investigating, I finally find the method to fix it.

1. Fix Filename Too Long Error When Use Git On Windows 10 Steps.

  1. First, you should make sure your windows 10 has enabled long file path support. You can refer article How To Enable Win10 Long File Path.
  2. Then open a terminal and run the command git config --global core.longpaths true.
  3. Now when you run Sourcetree to commit source code through git again, the error will disappear.

2 thoughts on “How To Fix Filename Too Long Error When Use Git On Windows 10”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.