Ahmad Awais



Quick Tip: Update an outdated fork on GitHub with a click

Ahmad AwaisAhmad Awais

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 …#

  1. Go to your GitHub fork repo on GitHub
  2. Find the Fetch upstream button/menu
  3. Click Fetch and merge β€” and we’re done

How to Update an Outdated Fork on GitHub With a Single Click

Thank you, GitHub for this one. Super useful.

Thoughts? Discuss on this tweet below ↓

Helping businesses build developer-led adoption for 10+ yrs.
VP of Developer Relations (DevRel, DX Eng., Dev Content Docs) at RapidAPI. I'm Hiring!

πŸ“Ÿ Edutainer at Node.js CLI Automation course (100 videos Β· 22 Projects) & VSCode.pro course. Over 36K devs learning. 🎩 Award-winning Open Source Engineer & Dev Advocate 🦊 Google Developers Expert Web DevRel πŸš€ Mars Ingenuity Helicopter code contributor πŸ† 8th GitHub Stars Award recipient 🌳 Node.js foundation Community Committee Outreach Lead, Member Linux Foundation, OpenAPI Business Governing Board, and DigitalOcean Navigator.

✌️ Author of various open-source dev-tools and software libraries used by millions of developers worldwide ⓦ WordPress Core Developer πŸ“£ TEDx Speaker with 100+ international talks.

πŸ”₯ Satya Nadella Β· CEO of Microsoft, said β€” Awais is an awesome example for developers.
πŸ™Œ Leading developers and publishing technical content for over a decade πŸ’œ Loves his wife (Maedah) ❯ Read more about Ahmad Awais.

πŸ‘‹β€¦ Awais is mostly active on Twitter @MrAhmadAwais


Developers Takeaway

Takeaway my professional opinion on open-source, developer relations, growing your business with family, and everything in between! Delivered to your inbox a couple of times every year. I'm even funny at times. I hate spam β€” pinky-promise!

πŸ‘¨β€πŸ’»πŸ‘©β€πŸ’» 168,174 Developers Already Subscribed
Comments 0
There are currently no comments.