Subtrees
You can use the Subtrees tab to manage external repositories embedded as subdirectories in your project.
Navigate the Subtrees tab
To open the Subtrees tab, click Git > Subtrees. The Subtrees tab opens in the Git Settings tab. To open the Subtrees tab in a separate tab, click the Open in new tab icon.
Subtrees are listed alphabetically and display the directory path, remote URL, and the last merge commit hash.
Add a subtree
To add a subtree, complete the following steps.
- In the Subtrees tab, click Add Subtree.
- In the Add Subtree dialog, select a repository.
- In the Prefix (directory path) field, enter the directory name of the subtree.
- Optional: In the Branch dropdown, select a branch to track in the subtree.
- Click Add Subtree.
Subtree actions
In the subtree row, click Pull to merge updates from the remote to the subtree. Click Push to push commits from the subtree to the remote. Click Split to separate the subtree history into a separate branch.
You can also click More options to open further actions for the subtree. Click Edit Remote URL to edit the stored remote URL of the subtree. Click Remove Subtree to remove the subtree.
Remote URL associations are stored in .git/info/subtree-remotes.