From the root of your local git repo:
$ git config core.sparsecheckout true $ echo a_directory_i_want_to_include/ > .git/info/sparse-checkout $ echo another_directory_i_want_to_include/ >> .git/info/sparse-checkout $ git read-tree -m -u HEAD
Validate:
$ ls a_directory_i_want_to_include/ another_directory_i_want_to_include/