Switch back to dev if we used a different base. Enhance output.
This commit is contained in:
@@ -909,20 +909,23 @@
|
||||
echo "* Unsure which branch to use for '$rcvr'. Please specify."
|
||||
exit 1
|
||||
fi
|
||||
echo "* Base not specified, using '$base' for '$rcvr'."
|
||||
echo -e "\n* Base not specified, using '$base' for '$rcvr'."
|
||||
fi
|
||||
echo "* Ensuring we are on base branch '$base'."
|
||||
echo -e "\n* Ensuring we are on base branch '$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"
|
||||
#echo "* Switching to branch '$rcvr'."
|
||||
#echo -e "\n* Switching to branch '$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"
|
||||
#echo "* Switching back to '$base'."
|
||||
#git switch "$base"
|
||||
echo "* Done! Displaying list of remote branches."
|
||||
echo -e "\n* Done! Displaying list of remote branches."
|
||||
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-stage="load-branch stage"
|
||||
|
||||
Reference in New Issue
Block a user