#!/bin/sh # Checkout and update source for all registered submodules (.gitmodules) cd $(git rev-parse --show-toplevel) git submodule update --init --checkout --quiet git submodule sync --quiet git submodule foreach --quiet git checkout --quiet -B master origin/HEAD git submodule foreach git pull --prune origin