Back our Angular 4 Book on Kickstarter.

How do I fix "Filename too long' error on SmartGit on Windows?

I've been working with a client on a project that uses AEM and ran into a problem committing code changes to their git repository. The error told me that the filename was too long.

The error was something like this:

error: unable to create file 'really long path to file' Filename too long

I banged my head on this for a bit, but eventually found a solution.

I had to change a flag with the version of Git that was included with SmartGit. Open up a console window. Move to your SmartGit install directory. For me that was:

C:\Program Files (x86)\SmartGit\

You should have a git subdirectory in there. Switch to it, and drill down into the bin directory. My full path would be this:

C:\Program Files (x86)\SmartGit\git\bin

Now run this command:

git config --system core.longpaths true

And try the commit again. Things should work fine.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
All Content Copyright 2005, 2006, 2007, 2008, 2009 Jeffry Houser. May not be reused without permission
BlogCFC was created by Raymond Camden. This blog is running version