From a2cfe2b9888b148ee67589839be9f4e6791e553f Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Thu, 2 Aug 2012 23:19:04 -0500 Subject: [PATCH] bin/git-subup: Force "git checkout master" foreach submodule Running "git submodule update --init" rewinds HEAD in each of the submodule directories to point to the revision set in the parent working copy. This could result in a broken HEAD pointer. To avoid weird submodule state, always do a forced "git checkout master" for each submodule after running the init/update and sync. --- bin/git-subup | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/git-subup b/bin/git-subup index 47be7b7..68cfad5 100755 --- a/bin/git-subup +++ b/bin/git-subup @@ -4,4 +4,5 @@ cd $(git rev-parse --show-toplevel) git submodule update --init --quiet git submodule sync --quiet +git submodule foreach --quiet git checkout --quiet master git submodule foreach git pull -- 2.43.0