If you want to pull the repository partially, you can try the commmands of sparse clone:
# open the sparse clone
git config core.sparsecheckout true
echo "some/dir/" >> ./git/info/sparse-checkout
Then you just need to pull as usual: git pull origin main.