[scripts/pull-request] handle branch already existing

This commit is contained in:
Mike Fährmann
2025-02-23 18:12:14 +01:00
parent 613f05afa3
commit b1487df381

View File

@@ -22,7 +22,8 @@ case "${2,,}" in
""|"f"|"fetch")
call git remote add "$USER" git@github.com:"$USER"/"$REPO".git || true
call git fetch "$USER" "$BRANCH"
call git checkout -b "$USER-$BRANCH" "$USER/$BRANCH"
call git branch "$USER-$BRANCH" "$USER/$BRANCH" || true
call git switch "$USER-$BRANCH"
;;
"m"|"merge")