git clone --no-checkout cd git sparse-checkout init --cone # checkout root dir files git sparse-checkout set # subdirs list to include git checkout