Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # HACK
- TO_HACK_WITH=$1
- CURRENT=`git branch | grep '\*' | awk '{print $2}'`
- if [ -z $TO_HACK_WITH ]; then
- echo "First argument has to be one of these branches:"
- git branch | grep -v $CURRENT
- exit 1
- fi
- STATUS=`git checkout $TO_HACK_WITH | awk '{print $1}'`
- if [[ "${STATUS}" =~ error ]]; then
- echo "Something went terribly wrong! ${STATUS}"
- git checkout $CURRENT
- exit 1
- fi
- git pull && \
- git checkout $CURRENT && \
- git rebase $TO_HACK_WITH
Add Comment
Please, Sign In to add comment