Skip to content

Submodules

You can use the Submodules tab to manage nested Git repositories within your project.

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.

ActionDescription
Add SubmoduleAdds a new submodule.
Init AllInitializes all uninitialized submodules.
Update AllUpdates all submodules.
Open .gitmodulesOpens the .gitmodules file in the File editor.

Add a submodule

To add a submodule, complete the following steps.

  1. In the Submodules tab, click Add Submodule.
  2. In the Add Submodule dialog, select a repository.
  3. In the Path field, enter the directory name of the submodule.
  4. Optional: In the Branch dropdown, select a branch to track in the submodule.
  5. 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.

ActionDescription
Update with nested submodulesRecursively updates the submodule.
Fetch from remoteUpdates the submodule from the remote branch.
Change URLUpdates the submodule remote URL.
Change tracked branchSwitches the branch the submodule tracks.
Repair remote URL from .gitmodulesSyncs the remote URL with the .gitmodules file.
Remove submoduleRemoves the submodule.