Git filename too long in Windows MINGW / Git Bash

We had some source code downloaded from internet and which was developed on Windows. We wanted to make sure we add this code to git so we track the further modification we do in it. So, after extraction and trying to do “git add” command, we received an error as below,

$ git add .

warning: could not open directory 'VERY_LONG_FILE_PATH' : Filename too long

fatal: adding files failed

So, adding files to git didn’t succeed. As we wanted to track this code with git any way, so we searched and found solution.

Note: This error is only visible on Windows Git clients such as MINGW or Git Bash.

Solution :

Type below command before doing git add,

$ git config --system core.longpaths true

Now, if you do “git add”

$ git add .

You will not see this error. Enjoy !

Lost Ark Error 10027 Fix - Cannot C... x
Lost Ark Error 10027 Fix - Cannot Connect To Server Due To Traffic

Leave a Comment

Sign up to our newsletter!

ADB Commands Android Android Applications Android Build system Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development, Debugging and Performance Tools Development and Build Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia NDK / Middleware / HAL Operating System Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web Design and Development Website Hosting Wordpress Yocto Embedded Linux