DEV Community

Cover image for Syncing Github Forks in 2 steps
Farhan Yahya
Farhan Yahya

Posted on • Edited on

4 1

Syncing Github Forks in 2 steps

Most of the time, after forking and working on a project other pull requests are being merged which leaves your copy behind the current state of the project.
This post walks you through a simple guide on how to sync your fork.

1. Add remote from the original project repo

This is the remote URL to the original project which you want to update your fork from.

git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git

Now check if upstream has been added

git remote -v

This will list the remote url's active in the local repo

2. Updating fork from the original repo

Run the below command to make a pull.

git pull upstream master

This pulls changes from the original repo and merges it into your local copy. And after this is happy coding :)

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more