Adds git alias to rebase current branch with master

This commit is contained in:
Vinicius Fernandes 2016-01-26 18:58:08 -02:00
parent 5464fe3e4a
commit f3f2f6e285

View File

@ -33,6 +33,13 @@ function work_in_progress() {
fi fi
} }
# Rebase current branch with the most updated master
#
function rebase_with_master() {
local b=$(git_current_branch)
git checkout master && git pull --rebase && git checkout $b && git rebase master
}
# #
# Aliases # Aliases
# (sorted alphabetically) # (sorted alphabetically)
@ -174,6 +181,7 @@ alias gpv='git push -v'
alias gr='git remote' alias gr='git remote'
alias gra='git remote add' alias gra='git remote add'
alias grb='git rebase' alias grb='git rebase'
alias grbb='rebase_with_master'
alias grba='git rebase --abort' alias grba='git rebase --abort'
alias grbc='git rebase --continue' alias grbc='git rebase --continue'
alias grbi='git rebase -i' alias grbi='git rebase -i'