How do I convert full checkout to sparse checkout?

北城余情 提交于 2019-12-12 04:34:51

问题


Having a full checkout of a repository, how can I convert it into a sparse checkout?


回答1:


Run

git config core.sparseCheckout true

then create .git/info/sparse-checkout

/*
!excluded-dir/

then run

git checkout master

and excluded-dir will disappear.

My problem was that I did not put a trailing slash behind the excluded directory in my .git/info/sparse-checkout Much thanks to http://www.richsomerfield.com/post/2014-03-05-adventures-in-git-sparsecheckouts/



来源:https://stackoverflow.com/questions/42626469/how-do-i-convert-full-checkout-to-sparse-checkout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!