Updating a fork directly from GitHub

Do you keep a fork of all the GitHub projects you use? Even if you’re not planning to make changes, this is useful because the original might disappear one day. The drawback is that you will most likely need to update your fork from time to time.

Of course, you can sync your fork with the original using git from the terminal. However, GitHub also made it very easy to do this directly from the website. It takes a few clicks, and I find it more convenient when I’m with limited connectivity.

Here’s how to update your fork directly from GitHub (as shown in the video above):

  1. Open your fork on GitHub.
  2. Click on Pull Requests.
  3. Click on New Pull Request. By default, GitHub will compare the original with your fork, and there shouldn’t be anything to compare if you didn’t make any changes.
  4. Click on switching the base. Now GitHub will compare your fork with the original, and you should see all the latest changes.
  5. Click on Click to create a pull request for this comparison and assign a predictable name to your pull request (e.g., Update from original).
  6. Click on Send pull request.
  7. Scroll down and click Merge pull request and finally Confirm merge. If your fork didn’t have any changes, you will be able to merge it automatically.

GitHub is increasingly enabling users to collaborate without using git. I find this fascinating, as it puts the power of open source collaboration on the hands of people who might not be developers. And that is a great thing.

9 thoughts on “Updating a fork directly from GitHub

  1. Stephen Boesch

    The procedure above worked one time. But when I tried to update this way a second time, all went haywire. A pull request was created on the SOURCE repo – and that was a bad thing because it is a high traffic OOS.

      1. PhillC

        The second sync, there is no “switching the base” page. The process as described creates a pull on the source repo.

  2. KDC

    This is a very helpful post, thanks! Github has somewhat updated how to do this in the meantime – would it be possible to update the instructions/video for the new “Edit” button that allows you to pick a big variety of head/base forks?

    1. hpique Post author

      Hi KDC. I noticed but I won’t have time to update this in the near future. If you create a post with the changes I will gladly link to it.

      1. Brian Teeman (@brianteeman)


        First – thanks a lot for this post as it really helped me earlier today so I thought I would pay back by writing an updated blog post with the github UI changes.

        However just like Stephen Boesch I can no longer perform step 4. After step 3 I dont get the option to switch base. I believe that this is because my branch is now one commit ahead of the original (the PR done originally in the previous successful pass through these instructions)

  3. Pingback: Solution: How to update GitHub forked repository? #dev #it #computers | Technical information for you

  4. Pingback: Fixed How to update GitHub forked repository? #dev #it #asnwer | Good Answer

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">