This is a simple tool to clone only subdirectories, it utilizes git sparse-checkout feature
May not work properly on Gitlab because sparse-checkout
is EXPERIMENTAL.
2.25.0 or later
git clone https://github.com/mt-empty/git-clone-subdirectory.git && cd git-clone-subdirectory
make install
$ git-clone-subdirectory <repository> [path_to_subdirectory]
Please do not use this in production.