DEV Community

Cover image for How to keep a forked repo up to date - journal
Cristien
Cristien

Posted on

How to keep a forked repo up to date - journal

I am trying to familiarise myself with React Native to contribute more to Bekah's Postpartum Wellness open source project and have been in touch with Bekah for a walkthrough of the project so I can try and work on open issues. She let me know that she's made a small change to the repo and I might need to grab the latest copy.

So, I thought I could just pull latest copy from the master branch but as I went on my local copy and git checkout master- it says the master branch is up to date. I thought of course it is as it is a forked repo.

With the help of Google, I came across this gist

📌 What I did:

  1. cd <local forked copy>
  2. git remote add upstream <original repo link>
  3. git fetch upstream
  4. git pull upstream masterto update my local forked repo.

I think that worked!

So today I learned this 🙂

Top comments (0)