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
Written by Jason Robinson
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rebase
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#