- Open your fork on GitHub.
- Click on Pull Requests.
- 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.
- Click switching the base if you see that link. Otherwise, manually set the base fork drop down to your fork, and the head fork to the upstream. Now GitHub will compare your fork with the original, and you should see all the latest changes.
- Create pull request and assign a predictable name to your pull request (e.g.,
Update from original
). - Scroll down to Merge pull request, but don't click anything yet.
Now you have three options, but each will lead to a less-than-clean commit history.
- The default will create an ugly merge commit.
- If you click the dropdown and choose Squash and merge, all intervening commits will be squashed into one. This is most often something you don't want.
- If you click Rebase and merge, all commits will be made "with" you, the original PRs will link to your PR, and GitHub will display
This branch is X commits ahead, Y commits behind <original fork>
.
So yes, you can keep your repo updated with its upstream using the GitHub web UI, but doing so will sully your commit history.
Add the remote, call it "upstream"
git remote add upstream https://github.com/notenverwaltung/Notenverwaltungssoftware.git
Fetch all the branches of that remote into remote-tracking branches
git fetch upstream
Make sure that you're on your master branch
git checkout master
Rewrite your master branch so that any commits of yours that aren't already in upstream/master are replayed on top of that other branch
git rebase upstream/master
If you've rebased your branch onto upstream/master you may need to force the push in order to push it to your own forked repository on GitHub. You'd do that with:
You only need to use the -f the first time after you've rebased.
git push -f origin master