CmdID

CmdID / Commands

git-subtree

Merge subtrees together or split repository into subtrees. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Add a Git repository as a subtree and squash the commits together

git subtree add --prefix path/to/directory --squash repository_url branch_nameIdentify

Update subtree repository to its latest commit

git subtree pull --prefix path/to/directory repository_url branch_nameIdentify

Merge recent changes up to the latest subtree commit into the subtree

git subtree merge --prefix path/to/directory --squash repository_url branch_nameIdentify

Push commits to a subtree repository

git subtree push --prefix path/to/directory repository_url branch_nameIdentify

Extract a new project history from the history of a subtree

git subtree split --prefix path/to/directory repository_url --branch branch_nameIdentify