git subtree

Manage project dependencies as subprojects. More information: https://manpages.debian.org/latest/git-man/git-subtree.1.html.

git subtree add --prefix={{path/to/directory/}} --squash {{repository_url}} {{branch_name}}

git subtree pull --prefix={{path/to/directory/}} {{repository_url}} {{branch_name}}

git subtree merge --prefix={{path/to/directory/}} --squash {{repository_url}} {{branch_name}}

git subtree push --prefix={{path/to/directory/}} {{repository_url}} {{branch_name}}

git subtree split --prefix={{path/to/directory/}} {{repository_url}} -b {{branch_name}}