Git报错git error unable to create file Invalid argument


解决方案,参见:https://stackoverflow.com/questions/26097568/git-pull-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

*

!kickstarter/parsers/data/kickstarter/campaigndetails/*


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 Zollty.com 版权所有。渝ICP备20008982号