Rebase on latest master without having to switch branches

git fetch origin master:master
git rebase master

This avoids the `git stash && git checkout master && git pull && git checkout $branchname && git rebase master && git stash pop` dance that I’ve been doing for a long time.

One Reply to “Rebase on latest master without having to switch branches”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.