Created
March 27, 2015 13:50
-
-
Save brianc/32d2835d6f752a65b1b8 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/bash | |
branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') | |
git fetch | |
git rebase origin/master | |
git rebase -i HEAD~`git log origin/master.. --pretty=oneline | wc -l | sed -e 's/^[ \t]*//'` | |
git push origin $branch --force | |
git checkout master | |
git pull | |
git merge $branch | |
git log master ^origin/master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment