Created
January 16, 2019 18:42
-
-
Save wescosta/05184740694bcaef624931f10e7af9c2 to your computer and use it in GitHub Desktop.
Git rebase current branch
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 | |
function rebase () { | |
branch=git branch | grep \* | cut -d ' ' -f2; | |
git checkout master; | |
git pull origin master; | |
git checkout $branch; | |
git rebase master $branch; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment