From a15a58450d0e7a5fa96c3270558dce9ae7c21efb Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 21 May 2024 07:06:17 +0100 Subject: [PATCH] Add submodule updating to git-sync-all wrapper script --- scripts/shell/git-sync-all.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/shell/git-sync-all.sh b/scripts/shell/git-sync-all.sh index 9202b23..52a4330 100755 --- a/scripts/shell/git-sync-all.sh +++ b/scripts/shell/git-sync-all.sh @@ -18,7 +18,10 @@ for i in "${!SYNC_DIRS[@]}"; do ( cd "$DIRECTORY" || exit git remote set-url origin "$URL" + git pull --ff --ff-only + git submodule update --remote --recursive git-sync -ns + git status --porcelain ) done @@ -44,7 +47,7 @@ for i in "${!PULL_DIRS[@]}"; do cd "$DIRECTORY" || exit if [ "$(git branch --show-current)" = "main" ]; then git remote set-url origin "$URL" - git pull --ff-only + git pull --ff --ff-only git push else echo "Not syncing repo $DIRECTORY on branch $(git branch --show-current)"