Skip to content

Instantly share code, notes, and snippets.

@wo0dyn
Created November 19, 2012 20:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wo0dyn/4113739 to your computer and use it in GitHub Desktop.
Save wo0dyn/4113739 to your computer and use it in GitHub Desktop.
GitHub HOW-TO “Resync a fork from original repo”

GitHub HOW-TO “Resync a fork from original repo”

I forked a repo dzen/omgcats a couple weeks ago on duboisnicolas/omgcats. I missed some commits so I need to resynchronize dzen/omgcats on duboisnicolas/omgcats.

$ git clone git://github.com/duboisnicolas/omgcats.git
$ cd omgcats 
# New branch for latest commits:
$ git checkout -b upstream/master
# Add new remote upstream from original repo:
$ git remote add upstream git://github.com/dzen/omgcats.git
# Retrieve commits:
$ git pull upstream master
# Go back to master:
$ git checkout master
# Merge upstream to master branch:
$ git merge upstream/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment