Filename too long error during git clone
Table of Contents
In this article, explained how to fix Filename too long error during git clone. This error you might be seen while clone the project in the longer folder structure.
We need to set the core.longpaths true either in the specific cloned repository or global configuration.
We can fix this issue in two ways as follows.
Global Fixes
Start Git Bash as Administrator and run the following git config command.
git config --system core.longpaths true
For better close the administrator Git bash, and open the new Git bash normally and then clone the repository again.
Specific Repository Fixes
We need to pass core.longpaths=true in the git clone command.
Syntax: git clone -c core.longpaths=true <repo-url> Example: git clone -c core.longpaths=true https://github.com/narayanatutorial/DecodeIdToken.git
Hello! I am Narayanaswamy founder and admin of narayanatutorial.com. I have been working in the IT industry for more than 12 years. NarayanaTutorial is my web technologies blog. My specialties are Java / J2EE, Spring, Hibernate, Struts, Webservices, PHP, Oracle, MySQL, SQLServer, Web Hosting, Website Development, and IAM(ForgeRock) Specialist
I am a self-learner and passionate about training and writing. I am always trying my best to share my knowledge through my blog.