-
-
Save jmeridth/1281163 to your computer and use it in GitHub Desktop.
The Good Morning Command
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
function rebasei { | |
branch_name="$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1 /')" | |
echo "Currently on $branch_name" | |
git checkout master | |
git pull origin master | |
git checkout $branch_name | |
git rebase -i master | |
} | |
function finishrebase { | |
branch_name="$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1 /')" | |
git checkout master | |
git merge $branch_name | |
git push origin master | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment