There were files that I wanted to upload to my git repository via soucetree but I got an error while staging, “file name too long”. Then I found a solution online ‘git config “–global” core.longpaths true’, afterwards I could stage, commit and push them. And I asked all my team members to use this command as well, and after they did, they could pull all those files.
However, now that the files are in the repository, I cannot open the files, I get the error: The following files were specified on the command line, these files could not be found and will not be loaded.
Solutions that I have tried, that didn’t work:
-
Made sure that SourceTree is using the System’s Git and not the embedded one. Tools > Options > Git > Use System Git
-
Add the line:
longpaths = true
to my .gitconfig file under the “core” section.
Rafia Baig is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.