Skip to main content
Submodules are managed in the Submodules section of the Repository tab. Open one as a child repository and you can use the graph, Working copy, and remote sync, just like in a regular repository.

Updating and initializing submodules

It checks out the commit the parent repository points to. Initialization (--init) always runs alongside it. Submodules that haven’t been initialized yet are handled in the same pass.
  • For Individual update, right-click a submodule entry and choose Update.
  • For Update all, click the refresh button in the section header (Update all submodules). Only this one runs with --recursive, so nested submodules are updated too.
The Repository panel with only the Submodules section expanded, showing a submodule entry right-clicked to open its Update / Remove menu

Opening one as a child repository

Double-click a submodule entry in the Repository tab (after auto-initializing it if needed) and a child-repository row appears under the parent repository in the Projects sidebar, and it is selected automatically. From then on, the graph, Working copy, and fetch/pull all operate on this submodule. If a submodule is tracked with Git LFS, its row also shows the LFS badge. See Git LFS.
The X button that appears when you hover over a child-repository row (Remove from sidebar) only removes the sidebar entry. It doesn’t touch .gitmodules or the actual files.

Adding and removing submodules

Click the Add submodule (+) button in the section header, fill in Repository URL (required), Path (required, relative to the parent), and Branch (optional), and click Add.
”Removing it from the sidebar” and “removing it from Git” are different things. The hover X only removes the sidebar entry, while Remove in the right-click menu actually removes it from Git.