Painless git submodules update
Another one of my favorite git alias is use to update submodules in git which without you would have to do something like this:
cd submodule_name
git checkout master
git pull
git submodule update --init --recursive
cd ..
for each submodule!
But once you run this :
git config --global alias.sub-it-up "!update_subs() { git submodule foreach 'git fetch origin --tags; git checkout master; git pull' && git pull && git submodule update --init --recursive;}; update_subs"
You'll be able to update all submodules with:
git sub-it-up
Written by raz ohad
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#