Submodules
You can use the Submodules tab to manage nested Git repositories within your project.
Navigate the Submodules tab
To open the Submodules tab, click Git > Submodules. The Submodules tab opens in the Git Settings tab. To open the Submodules tab in a separate tab, click the Open in new tab icon.
Submodules are listed alphabetically and display the directory path.
The following actions are displayed in the Submodules tab.
| Action | Description |
|---|---|
| Add Submodule | Adds a new submodule. |
| Init All | Initializes all uninitialized submodules. |
| Update All | Updates all submodules. |
| Open .gitmodules | Opens the .gitmodules file in the File editor. |
Add a submodule
To add a submodule, complete the following steps.
- In the Submodules tab, click Add Submodule.
- In the Add Submodule dialog, select a repository.
- In the Path field, enter the directory name of the submodule.
- Optional: In the Branch dropdown, select a branch to track in the submodule.
- Click Add Submodule.
Submodule actions
In the submodule row, click Open to open the submodule as a separate project tab. Click Update to update the submodule.
You can also click More options to open further actions for the submodule. The following actions are available for each submodule.
| Action | Description |
|---|---|
| Update with nested submodules | Recursively updates the submodule. |
| Fetch from remote | Updates the submodule from the remote branch. |
| Change URL | Updates the submodule remote URL. |
| Change tracked branch | Switches the branch the submodule tracks. |
Repair remote URL from .gitmodules | Syncs the remote URL with the .gitmodules file. |
| Remove submodule | Removes the submodule. |