Update or pull the latest content to a submodule

A common scenario is you are using an open source project as part of your own project. You would want to be updated from time to time and not modifying anything.

You need to run git submodule update --remote to update all your submodules. If you have a lot of them, try update each of them by passing a submodule name to the command.

[email protected]:~/youtube-dl$ git submodule update --remote
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 4 (delta 2), reused 4 (delta 2)
Unpacking objects: 100% (4/4), done.
From https://github.com/psf/requests.git
   27cf5d3..c87d55d  stable -> origin/stable
Submodule path 'requests': checked out 'c87d55d4c6d4b05ee34fbc8cb6f7bf4585ae6687'

Leave a Comment