Developers fork repositories and forget about them. I mean until they need it again. But git’s moved on by then — your fork is probably suffering the same fate which is why you’re reading this. How should I update an outdated fork?
Before today you had to do the following:
git remote add upstream <clone-url>
git fetch upstream
git checkout master
git reset --hard upstream/master
git push --force origin master
Well, worry no more. You don’t have to do any of that since today!
Here’s how to update an outdated fork in 2021 …#
- Go to your GitHub fork repo on GitHub
- Find the
Fetch upstream
button/menu
- Click
Fetch and merge
— and we’re done

Thank you, GitHub for this one. Super useful.
Thoughts? Discuss on this tweet below ↓