Update all Git submodules to the latest commit

If you use Git submodules often, here's the one-liner to update them to the latest commit on origin (since Git 1.8.2):

git submodule update --remote --rebase

Prefer merging? Swap --rebase for --merge.

Thanks for reading! If you notice anything outdated, feel free to comment or send me a message.

← Back to Notes