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://user@repourl/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
Leave a Reply
Want to join the discussion?Feel free to contribute!