Refactor merge-to-branch script to use default branch if no branch is specified

This commit is contained in:
mr. M
2024-10-11 18:54:13 +02:00
parent 349e8a9203
commit 93774f17c8

View File

@@ -0,0 +1,13 @@
branch="$1"
default_branch="central"
if [ -z "$branch" ]; then
branch="$default_branch"
fi
git checkout "$branch"
git merge "$default_branch"
git push origin "$branch"
git checkout "$default_branch"