2025-08-23T19:59:23+02:00

This commit is contained in:
2025-08-23 19:59:23 +02:00
parent 0c6575f52e
commit d74cd1d489
2 changed files with 54 additions and 0 deletions
Executable
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Define the branch name
BRANCH_NAME="dev"
if [ ! $(git rev-parse --abbrev-ref HEAD) == $BRANCH_NAME ]; then
# Fetch the latest changes from the remote
git fetch origin
# If the branch exists, just switch to it
git switch $BRANCH_NAME || (git switch -c $BRANCH_NAME && git push -u origin $BRANCH_NAME)
fi
# get the latest changes
git pull origin $BRANCH_NAME --ff-only