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.

(Top ) — — — — — — — — — — — — — — —— — — — — — — <Scrolling> — — — — — — — — — — — — — — — — — — — — — — — — (Bottom)

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!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

🐍Pattern coding challenge with one twist🐍

The basics of Converting an HTML Template to WordPress Theme

Home Heating Control System

#MentalHealthAwarenessMonth: Developer Burnout

The Complete Java Certification Course.

Data Structures: Stack

Data Science👨‍💻: Data Preprocessing with Orange Tool

Book Notes: Changing Software Development — Allan Kelly

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Reed

Adam Reed

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!

More from Medium

A Byte of Coding Issue #157

Clean Code by Robert C. Martin [Book Review]

clean room

Pair Programming

Libraries in C language