- at repo-1
cd repo-1
git subtree split -P dir-to-move -b <split>
- at repo-2
cd repo-2
git checkout --orphan <temp> # Create a branch with no history
git pull <path-to-repo-1.git> <split> # Pull the commits from the subtree
git checkout <branch> # Go back to the original branch (DONT use 'switch')
git merge --allow-unrelated-histories <temp> # Merge the unrelated commits back
git branch -d <temp> # Delete the temporary branch