Adding A Submodule/Subtree with SourceTree

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

This article should help users to add a new submodule and subtree via SourceTree.

Solution

To create a new submodule or subtree, users can:

1. Right-click the sidebar and select Add Submodule or Add/Link Subtree.

2. Click Repository at the top, and select Add Submodule or Add/Link Subtree.

(Auto-migrated image: description temporarily unavailable)

This is the popup window that will appear if Add Submodule is selected:

(Auto-migrated image: description temporarily unavailable)

This is the popup window that will appear if Add/Link Subtree is selected:

(Auto-migrated image: description temporarily unavailable)

For Subtree, selecting the globe button will open up the Viewing Remote Hosted Repositories window.

Fill in the necessary details, select OK.

The end result should look like this:

(Auto-migrated image: description temporarily unavailable)

Submodules and Subtrees section weren't at the sidebar. They only appear when they are first added.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.