Skip to main content

Tool to manage project dependencies as sub-projects.

# To add a git repository as a subtree:
git subtree add --prefix=<path/to/directory/> --squash <repository_url> <master>

# To update subtree repository to its latest commit:
git subtree pull --prefix=<path/to/directory/> <repository_url> <master>

# To merge a subtree repository into master:
git subtree merge --prefix=<path/to/directory/> --squash <repository_url> <master>

# To push commits to a subtree repository:
git subtree push --prefix=<path/to/directory/> <repository_url> <master>

# To extract a new project history from the history of a subtree:
git subtree split --prefix=<path/to/directory/> <repository_url> -b <branch_name>