Git Sparse Checkout

From the root of your local git repo:

uhleeka@uhleeka.local /cygdrive/c/projects/test (master)
$ git config core.sparsecheckout true

uhleeka@uhleeka.local /cygdrive/c/projects/test (master)
$ echo a_directory_i_want_to_include/ > .git/info/sparse-checkout

uhleeka@uhleeka.local /cygdrive/c/projects/test (master)
$ echo another_directory_i_want_to_include/ >> .git/info/sparse-checkout

uhleeka@uhleeka.local /cygdrive/c/projects/test (master)
$ git read-tree -m -u HEAD

Validate:

uhleeka@uhleeka.local /cygdrive/c/projects/test (master)
$ ls
a_directory_i_want_to_include/ another_directory_i_want_to_include/
Filed Under: Git | Tagged: