I'm versioning only a repo folder with git sparsecheckout. I followed the instructions on this blog. I already had the repo, so what I did was:
git config core.sparsecheckout true
echo api/ >> .git/info/sparse-checkout
git read-tree -mu HEAD
It worked, but it also added other api
folders inside the project, but I only want to add the top level api
folder, not all api
folders in the project.
Any idea how to make this work?