If you want to update git submodules, you will need to do this directly in your submodules directory

# download the submodule
git submodule add https://[email protected]/reponame.git submodule_dir/

# initialize the submodule
git submodule init
# update your submodule
cd submodule_dir/
git checkout master 
# or git checkout mybranch
git pull

# commit the submodule update from root directory
cd ../
git commit -am "update submodule_dir to commit Abc123"

Or if you like shortcuts:

git submodule foreach git pull origin master
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *