Add aliases for submodule updates to gitconfig target

Updating submodules seem to give people headaches, so this adds a pair
of git aliases to update them.

'git sup' updates the submodules to the latest versions, but leaves any
locally modified files.

'git sup-destroy' will remove the current submodules and re-initialize
them.  This deletes any local changes.

Change-Id: Id62a30d88b3b6d285b3f00555d7609509aa1561f
Signed-off-by: Martin Roth <>
Tested-by: build bot (Jenkins)
Reviewed-by: Omar Pakker
Reviewed-by: Paul Menzel <>
Reviewed-by: Patrick Georgi <>
diff --git a/ b/
index 40e8942..ffe6015 100644
--- a/
+++ b/
@@ -575,6 +575,8 @@
 	[ -d 3rdparty/blobs ] && cd 3rdparty/blobs && git config remote.origin.push HEAD:refs/for/master
 	git config remote.origin.push HEAD:refs/for/master
+	git config alias.sup '!git submodule update --remote --rebase && git submodule update --init --checkout'
+	git config alias.sup-destroy '!git submodule deinit --force "$$(git rev-parse --show-toplevel)"; git submodule init && git submodule update --checkout'
 	(git config --global >/dev/null && git config --global >/dev/null) || (printf 'Please configure your name and email in git:\n\n git config --global "Your Name Comes Here"\n git config --global\n'; exit 1)
 include util/crossgcc/