How to fetch upstream changes in git easily

Patrick Martini April 18, 2012

It is quite common to update your git fork repository with the upstream changes.

Here it is the workflow I use to keep synchronize my branch with Octopress.

If you prefere you can create an alias in your .gitconfig. {% codeblock %} [alias] pull_upstream = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master" {% endcodeblock %}

Now git pull_upstream will fetch the changes of both remotes, and the merge in the upstream changes.