Skip to content

Commit

Permalink
Merge pull request #2 from kjetilhp/feature/1234-big-new-thing
Browse files Browse the repository at this point in the history
Fix: script error
  • Loading branch information
kjetilhp authored Nov 15, 2024
2 parents e426a39 + fd03911 commit b111b74
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions feat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ then
exit 1
fi

#check that the repo is clean and up to date
if [ -n "$(git status --porcelain)" ]
then
echo "You have uncommitted changes"
exit 1
fi
# git fetch
if [ -n "$(git diff --name-only origin/$CURRENT_BRANCH)" ]
then
echo "You are not up to date with the remote branch"
exit 1
fi

# echo "extension: $EXTENSION"
# echo "searchpath: $SEARCHPATH"
# echo "default: $DEFAULT"
Expand Down Expand Up @@ -66,8 +79,8 @@ then
git push origin --delete "feature/$BRANCH"
else
echo "Creating branch: "$BRANCH
git checkout main
git checkout $CURRENT_BRANCH
git pull
git checkout -b "feature/$1" main
git checkout -b "feature/$1" $CURRENT_BRANCH
git push -u origin "feature/$1"
fi

0 comments on commit b111b74

Please sign in to comment.