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:

view plain print about
1C:\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:

view plain print about
1C:\Program Files (x86)\SmartGit\git\bin

Now run this command:

view plain print about
1git config --system core.longpaths true

And try the commit again. Things should work fine.