Home > OS >  cannot stat: Filename too long on GIT PULL
cannot stat: Filename too long on GIT PULL

Time:12-13

I am getting the below error while pulling changes from a GIT branch ....

cannot stat 'somelongfilename.sql': Filename too long

c As a solution, I am trying to add longpaths = true to gitconfig file. This is located in the system default folder and I do not have permission to edit this file.

I am looking for a quick solution here. Is there any other way I can resolve this issue instead of editing gitconfig file?

CodePudding user response:

git takes the -c option to set a configuration option for the command. For example git -c core.longpaths=true pull ... should enable core.longpaths=true for the duration of the pull command.

Note, however, that you still need to set the system-level requirements to enable long paths on Windows before git can take advantage of them.

CodePudding user response:

I solved the issue with the below command

Used

git config --global core.longpaths true

instead of

git config --system core.longpaths true

  • Related