Skip to content

Instantly share code, notes, and snippets.

@pchrysa
Created February 14, 2017 09:22
Show Gist options
  • Save pchrysa/309b0dd4f968ccad18eae3f6ab4498e5 to your computer and use it in GitHub Desktop.
Save pchrysa/309b0dd4f968ccad18eae3f6ab4498e5 to your computer and use it in GitHub Desktop.
How to keep a forked project up to date with the original repo changes

1. Clone forked repo from your github:

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

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

cd forked-repo-name
git remote add forked git://github.com/ORIGINAL-USERNAME/FORKED-REPO-NAME.git

3. Updating your fork master branch to keep up with original repo changes:

git pull forked master

4. Update your remote fork to be up to date

git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment