Create, Pull, and Backport Subtree Create Subtree Add a new remote called plugin pointing to the plugin's repository:
Then Create a subtree specifying the new folder prefix plugins/demo. plugin is the remote name, and master refers to the master branch on the subtree's repository:
Pull Subtree Updates Pull normal commits made in plugin:
Backport Subtree Updates
Specify commits made in superproject to be backported:
Checkout new branch for merging, set to track subtree repository:
Cherry-pick backports:
Push changes back to plugin source:
Syntax git subtree add -P <prefix> <commit> git subtree add -P <prefix> <repository> <ref> git subtree pull -P <prefix> <repository> <ref> git subtree push -P <prefix> <repository> <ref> git subtree merge -P <prefix> <commit> git subtree split -P <prefix> [OPTIONS] [<commit>] This is an alternative to using a submodule (opens new window)