-
Notifications
You must be signed in to change notification settings - Fork 150
Syncing your fork to the original repository via the browser
When you create a fork of a repository (here are some instructions) you only have the versions of the files that are in the repository at that time. So if there are any changes in the original repository you may find that your version (your fork) is out of sync.
This can lead to problems when you try to create a pull request.
While GitHub has instructions for merging an upstream repository into your fork they require you to have git installed on your local machine.
Fortunately, the cool kids from the Mozilla Science Working Open Workshop had the answer. You can update your fork in the browser by following the easy steps laid out in this stack overflow answer.
That Stack Overflow answer has picture which are really helpful, but briefly, here's what you do:
-
Open your fork of the repository.
-
Click the compare button.
This will open a page titled Comparing Changes and if you look carefully you'll have jumped to the upstream version of the repository. If you were to do a regular pull request then this makes sense as you'd be bringing your changes into the upstream version. But in this case we want to flip the direction and pull changes from the original version to our fork.
-
Change the base fork to your repository
-
You're now back to your fork but you've also asked to compare two identical repositories so GitHub thinks you care about branches not forks. Click on compare across forks to get back your base fork option.
-
Change the head fork to the upstream (original) repository
-
You'll see one of two options:
- "There isn’t anything to compare" This means you're up to date and you don't have to do anything. Phew. 😌
- A list of commits. These are the changes that have happened in the repository since you forked your version. Go to step 7.
-
Create a pull request
Note that this pull request is to you! So you can confirm that it's ok and merge it when necessary. And if there are any merge conflicts then it's up to you to figure out what's gone wrong and sort them out.
And now you're ready to continue working on your fork 😃 💥 🎉
Well done!