Created
October 14, 2015 18:52
-
-
Save rajatvig/776fc9c34223be84fa80 to your computer and use it in GitHub Desktop.
Rebase the Master when working with Gerrit
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 git_rebase_from_master | |
function _git_branch_name | |
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||') | |
end | |
set -l git_branch (_git_branch_name) | |
git checkout master | |
git pull --rebase origin master | |
git fetch --all | |
git checkout $git_branch | |
git rebase master | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment