Git Bisect, Cherry-pick, and Submodule Cheat Sheet/Update submodules to their tracked remote branches

Fetch and move submodules according to configured tracking branches.

Section: Submodule Workflows

Update submodules to their tracked remote branches

bash
bash
git submodule update --remote --recursive
Explanation

Useful when submodules are meant to follow upstream branch tips rather than staying pinned until manually updated.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Submodule Workflows
Show submodule status
Inspect recorded commit pointers and checkout state.
OpenIn sheetbashsame section
Clone including submodules
Clone a repository and initialize its submodules immediately.
OpenIn sheetbashsame section
Run a command in every submodule
Execute a shell command across all submodules.
OpenIn sheetbashsame section
Sync submodule URLs
Update local submodule config from `.gitmodules`.
OpenIn sheetbashsame section
Remove a submodule carefully
Delete submodule entry and tracked path.
OpenIn sheetbashsame section
Start bisect with good and bad revisions
Initialize bisect and mark boundaries.
OpenIn sheetbash1 tag match