git subtree add --prefix {local directory being pulled into} {remote repo URL} {remote branch} --squash
For example:
git subtree add --prefix subtreeDirectory git@github.com:smilee/subtreeDirectory.git main --squash
will clone git@github.com:smilee/subtreeDirectory.git into the 'subtreeDirectory' directory.
git remote add -f subtreeDirectory git@github.com:smilee/subtreeDirectory.git
git fetch subtreeDirectory main
git subtree pull --prefix subtreeDirectory subtreeDirectory main --squash