What To Do If You Can’t Commit To GitHub Because Your Filenames Are too Long

This is a common problem when importing assets online that were made by other people. It says that the file names are too long and that it is unable to process the path.

If you go to commit and see a similar error to the one in the example below then look at the bottom and see what it says.

If it says:

Then here is how you might be able to fix it!

Make sure that you have GitBash downloaded and installed. If you don’t then you can just follow this link to go to another one of my articles for instructions on how to do so.

[Side Note]

For further information on using GitBash check out this other article of mine.

Now, right-click on your unity projects file in your file explorer and select “GitBash Here”.

and now inside pf the git bash window simply type:

git config — global core.longpaths true

Then hit enter and bam! You're done!! it should be working fine now!!!

Hi, my name is Adam Reed and I am a software engineer specializing in Unity and C# development. Feel free to scroll through and check out some of my work!