From 49b80c3ef0bbcdefc175956e900c6cb731a0d7ee Mon Sep 17 00:00:00 2001 From: Felipe Suero Date: Mon, 17 Apr 2023 14:35:54 -0400 Subject: [PATCH] switch all to main and pull --- languageservice/sync-to-main.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 languageservice/sync-to-main.sh diff --git a/languageservice/sync-to-main.sh b/languageservice/sync-to-main.sh new file mode 100755 index 0000000..e8245ed --- /dev/null +++ b/languageservice/sync-to-main.sh @@ -0,0 +1,16 @@ +## This script syncs all five repositories to the current state of main. +## It will stash changes on the current branch, switch to main, pull and remain on main. + +echo "Syncing all repositories to main" + +# for each folder in the above directory +cd .. +for d in */ ; do + cd $d + echo "Syncing $d" + echo "current branch: $(git rev-parse --abbrev-ref HEAD)" + git stash + git checkout main + git pull + cd .. +done \ No newline at end of file