This commit is contained in:
2025-08-26 18:33:56 +02:00
parent 4b06060222
commit 6e5dea6b65
9 changed files with 211 additions and 2 deletions

18
pull.sh Executable file
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