Last Updated: February 25, 2016
·
600
· jaywink

Update master and rebase current branch in one command

Saves current branch in variable, pulls from origin and returns to current branch to do a rebase

BRANCH="`git status -bs | sed s/\#\#\ //`" && git checkout master && git pull origin && git checkout $BRANCH && git rebase master