-
-
Save shogo82148/3214667 to your computer and use it in GitHub Desktop.
git-master
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/sh | |
MASTER=${1:-"master"} | |
WORKING_BRANCH=`git branch -l | grep "*" | cut -d " " -f 2` | |
git rebase $MASTER && git checkout $MASTER && git reset --hard $WORKING_BRANCH && git branch -D $WORKING_BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment