From e4a5cb6416a8908a65e274cd00f7ea04f5094d77 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Wed, 8 Mar 2023 08:58:33 +0100 Subject: Stash and pop changes when syncing --- lib/subcommands/sync.bash | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/subcommands/sync.bash') diff --git a/lib/subcommands/sync.bash b/lib/subcommands/sync.bash index 0413ce4..ed03faa 100644 --- a/lib/subcommands/sync.bash +++ b/lib/subcommands/sync.bash @@ -17,8 +17,12 @@ subcommand() notice "bashtard/sync" "Syncing $BASHTARD_ETCDIR" pushd -- "$BASHTARD_ETCDIR" > /dev/null || return 4 + + git stash git pull origin master || return 4 git submodule update --recursive --remote || return 4 + git stash pop + popd > /dev/null || return 4 # Run a sync for each registered playbook for this host -- cgit v1.1