git sparse checkout - lmmx/devnotes GitHub Wiki
Sparse checkout:
git clone --no-checkout $YOUR_REPO_URL
cd $REPO_NAME
git sparse-checkout init --cone
git checkout $BRANCH_NAME
git sparse-checkout add PATH/TO/DIR1 PATH/TO/DIR2
Sparse checkout:
git clone --no-checkout $YOUR_REPO_URL
cd $REPO_NAME
git sparse-checkout init --cone
git checkout $BRANCH_NAME
git sparse-checkout add PATH/TO/DIR1 PATH/TO/DIR2