6

I am trying to sparse-checkout a subdirectory from my git repository.

The repository contains multiple plugins for wordpress and I want to check them out one by one. With the below posted solutions I have encountered the problem that EVERYTIME I check out the parent directory of the subdirectory is also checked out and the plugins are not working.

I tried something like this Is it possible to do a sparse checkout without checking out the whole repository first? and something like that Git sparse checkout for simple web deployment .

I really hope somebody can help me because I just feel like I kind of missed some information.

Thank you.

dreftymac
  • 31,404
  • 26
  • 119
  • 182
chris9r
  • 61
  • 3
  • You said you tried to follow those other answers. Did they work? Did they not work? What happened? – larsks Feb 24 '16 at 18:34
  • They did not work. I just wanted to checkout the subdirectory without any parent directories, so I set the options in the sparse-checkout file like suggested in the links I posted. What happened was, that when I wanted to checkout for example subdirectory 2 from the following structure: [Parent] > [subdirectory 1], [subdirectory 2] the parent folder was checked out also and I couldn't use it in the wordpress plugins folder. – chris9r Feb 27 '16 at 10:51
  • **See also:** https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository – dreftymac Nov 14 '19 at 17:17
  • So finally were you able to checkout subdirectory without its parent directory, I am also stuck in same problem. Please help me if you have found the solution – vikrant kamble Dec 01 '20 at 12:59

0 Answers0