Created
March 20, 2015 07:45
-
-
Save devopsmariocom/eae1cba9a31523d612c4 to your computer and use it in GitHub Desktop.
Simple script for git rebasing with force push
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` | |
if [ $CURRENT_BRANCH == "develop" ];then | |
echo "Not allowed for develop branch" | |
else | |
git fetch origin && git rebase origin/develop && git push --force | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment