GitHub Fetch Upstream Branch

Date Published: 11 May 2021

GitHub Fetch Upstream Branch

A couple of years ago, I wrote an article on how to use the git command line to sync a fork with its upstream branch. Now, you should need those instructions much less frequently, because GitHub has added support for it to its web application. You'll find it in the image below:

GitHub Fetch Upstream

Once you click on the 'Fetch Upstream' button, there's a dialog to confirm:

GitHub Fetch Upstream confirm

Click the button and assuming no major conflicts, you should have your fork updated to the upstream branch, with a dialog at the top of your browser confirming as much:

GitHub Fetch Upstream confirm

Considering that doing this locally requires a bunch of git CLI commands that I typically have to look up every time, this is definitely a welcome addition to GitHub's web site.

Additional References

Steve Smith

About Ardalis

Software Architect

Steve is an experienced software architect and trainer, focusing on code quality and Domain-Driven Design with .NET.