Only continue each commnd if they are successful.

This commit is contained in:
2025-10-15 06:15:13 -07:00
parent 13bc98d7ef
commit 40ee72b587

View File

@@ -911,17 +911,17 @@
fi
echo "* Base not specified, using '$base' for '$rcvr'."
fi
echo "* Ensuring we are on base branch '$base'."
git switch "$base"
echo "* Changing pointer for '$rcvr' to '$base'."
git branch -f "$rcvr" "$base"
#echo "* Switching to branch '$rcvr'."
#git switch "$rcvr"
echo "* Forcing push on branch '$rcvr'."
git push --force --set-upstream origin "$rcvr"
#echo "* Switching back to '$base'."
#git switch "$base"
echo "* Done! Displaying list of remote branches."
echo "* Ensuring we are on base branch '$base'." &&
git switch "$base" &&
echo "* Changing pointer for '$rcvr' to '$base'." &&
git branch -f "$rcvr" "$base" &&
#echo "* Switching to branch '$rcvr'." &&
#git switch "$rcvr" &&
echo "* Forcing push on branch '$rcvr'." &&
git push --force --set-upstream origin "$rcvr" &&
#echo "* Switching back to '$base'." &&
#git switch "$base" &&
echo "* Done! Displaying list of remote branches." &&
git ls-remote --heads | sort
}
alias load-prod="load-branch prod"