Is it possible to do a sparse checkout without checking out the whole repository first?

后端 未结 14 1757
醉梦人生
醉梦人生 2020-11-22 09:32

I\'m working with a repository with a very large number of files that takes hours to checkout. I\'m looking into the possibility of whether Git would work well with this kin

14条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-22 10:26

    Git clone has an option (--no-checkout or -n) that does what you want.

    In your list of commands, just change:

    git clone 
    

    To this:

    git clone --no-checkout 
    

    You can then use the sparse checkout as stated in the question.

提交回复
热议问题