Last active
December 25, 2015 09:09
-
-
Save traviskroberts/6952241 to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
CURRENT=`git branch | grep '\*' | awk '{print $2}'` | |
TARGET=$1 | |
: ${TARGET:="master"} | |
echo "\033[33m=> git checkout ${TARGET}\033[0m" | |
git checkout ${TARGET} | |
echo "\033[33m=> git pull origin ${TARGET}\033[0m" | |
git pull origin ${TARGET} | |
echo "\033[33m=> git checkout ${CURRENT}\033[0m" | |
git checkout ${CURRENT} | |
echo "\033[33m=> git rebase ${TARGET}\033[0m" | |
git rebase ${TARGET} |
This file contains 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/sh | |
CURRENT=`git branch | grep '\*' | awk '{print $2}'` | |
TARGET=$1 | |
: ${TARGET:="master"} | |
echo "\033[33m=> git checkout ${TARGET}\033[0m" | |
git checkout ${TARGET} | |
echo "\033[33m=> git merge ${CURRENT}\033[0m" | |
git merge ${CURRENT} | |
echo "\033[33m=> git push origin ${TARGET}\033[0m" | |
git push origin ${TARGET} | |
echo "\033[33m=> git checkout ${CURRENT}\033[0m" | |
git checkout ${CURRENT} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment