Created
July 3, 2013 12:22
-
-
Save stasl/5917465 to your computer and use it in GitHub Desktop.
rebase current branch
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
BRANCH=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
git co master; | |
git pull --rebase; | |
git co $BRANCH; | |
git rebase master; | |
git push --force origin $BRANCH; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
just suggestions
get current branch:
git branch | sed -n '/* /s///p'
rebase:
git fetch origin
git rebase origin/master