Git报错git error unable to create file Invalid argument


I ran into the same problem, but wasn't willing to rename or delete these files. So here's a workaround in case you can live without accessing those files using a sparse-checkout:

Go to the .git folder in your repo and open the file config. (You can also edit your configuration using tortoise-git, but I havn't got it installed here.) In the [core]section add the line

sparsecheckout = true

then go to the folder .git/info and create the file sparse-checkout. Add something like



The first line includes everything, while the second excludes all files in kickstarter/parsers/data/kickstarter/campaigndetails/. You should now be able to checkout the repo. Using wild-cards you can probably do more sophisticated excludes.


© 2009-2020 版权所有。渝ICP备20008982号