Filename too long when cloning git repository


When cloning a git repository to a Windows PC, “File name too long” was shown in checking out step.


Windows system limited the file path to 260 characters


Option 1: Config git to use long file path in Windows system by below command:

git config --system core.longpaths true

Option 2: Update the config file (.gitconfig) as below

 longpaths = true

Normally, the .gitconfig file is in C:\Users\<your username>\

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.