Skip to content

Instantly share code, notes, and snippets.

@palimadra
Forked from CristinaSolana/gist:1885435
Last active August 29, 2015 14:03
Show Gist options
  • Save palimadra/f4ae3b5a8ccf965b3b07 to your computer and use it in GitHub Desktop.
Save palimadra/f4ae3b5a8ccf965b3b07 to your computer and use it in GitHub Desktop.
How to ensure that forks are updated whenever the master is updated.

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream

3. Updating your fork from original repo to keep up with their changes:

git pull upstream master

Adding syncing through the web interface:

* Get the URL for the master repository
* Nex to the green button at the top click the button "branch master" button with the drop down.
* Insert the URL of the master respoitory in the input box provided and hit enter
* Now whenever there is an update to the master repository you will see a notification and you can pull the updates to either merge them or overwrite your repository
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment