Updating and Synchronizing Submodules
Master the process of updating submodules to their latest versions and synchronizing submodule URLs.
Keeping Submodules Current
When you work with Git submodules, the main project (superproject) usually points to a specific commit of the submodule, not necessarily its latest version.
This lesson teaches you how to update your submodules to newer versions and ensure their configurations are correct.
The Basic `git submodule update`
The most common command to update submodules is git submodule update. This command does two main things:
- It checks out the exact commit that the superproject expects for each submodule.
- It ensures the submodule's working directory matches this recorded commit.
It does not fetch new commits from the submodule's remote repository.
git submodule updateAll lessons in this course
- Introduction to Git Submodules
- Adding and Cloning Submodules
- Updating and Synchronizing Submodules
- Removing and Deinitializing Submodules