Switch back to dev if we used a different base. Enhance output.

This commit is contained in:
2025-10-15 06:18:22 -07:00
parent 13bc98d7ef
commit b60ddfe419

View File

@@ -909,20 +909,23 @@
echo "* Unsure which branch to use for '$rcvr'. Please specify." echo "* Unsure which branch to use for '$rcvr'. Please specify."
exit 1 exit 1
fi fi
echo "* Base not specified, using '$base' for '$rcvr'." echo -e "\n* Base not specified, using '$base' for '$rcvr'."
fi fi
echo "* Ensuring we are on base branch '$base'." echo -e "\n* Ensuring we are on base branch '$base'."
git switch "$base" git switch "$base"
echo "* Changing pointer for '$rcvr' to '$base'." echo -e "\n* Changing pointer for '$rcvr' to '$base'."
git branch -f "$rcvr" "$base" git branch -f "$rcvr" "$base"
#echo "* Switching to branch '$rcvr'." #echo -e "\n* Switching to branch '$rcvr'."
#git switch "$rcvr" #git switch "$rcvr"
echo "* Forcing push on branch '$rcvr'." echo -e "\n* Forcing push on branch '$rcvr'."
git push --force --set-upstream origin "$rcvr" git push --force --set-upstream origin "$rcvr"
#echo "* Switching back to '$base'." echo -e "\n* Done! Displaying list of remote branches."
#git switch "$base"
echo "* Done! Displaying list of remote branches."
git ls-remote --heads | sort git ls-remote --heads | sort
if [[ "$base" != "dev" ]]; then
echo -e "\n* Switching back to dev."
git switch "$base"
fi
} }
alias load-prod="load-branch prod" alias load-prod="load-branch prod"
alias load-stage="load-branch stage" alias load-stage="load-branch stage"