git pull on a different branch

I found an incantation that worked for me:

git fetch origin master:master

then (if you want to merge right away):

git merge master

I was really surprised how hard it was to find an answer to this since it seems like it would be a common use case.

Leave a Comment