Update GitHub fork
Wednesday, December 07, 2011You need A feature and you know how to make it by extending B, an open source project repo hosted on GitHub.
You first should fork B repo, edit, test and commit your changes.
Than you send your pull request and you’re done.
After some inactivity on your fork your local repo is outdated, how can you update your fork getting code from the main repo?
-
Add
upstreamremote to track main repo$ git remote add upstream git://github.com/octocat/Spoon-Knife.git -
Fetch upstream remote in your local repo
$ git fetch upstream -
Merge
upstream/masterin your current branch to apply updates$ git merge upstream/master
Resources: