Merge changes from remote github repository to your local repository

Željko Filipin picture Željko Filipin · May 15, 2009 · Viewed 83.8k times · Source

I have forked a repository on github some time ago, made a small change and pushed the change back to my github fork. The original repository has changed since. I would like to merge the changes from the original repository to my fork.

I am new to both git and github, and I need specific commands how to do it.

Answer

Željko Filipin picture Željko Filipin · May 15, 2009
git remote add {name} {Public Clone URL}
git pull {name} master
git push

Example:

git remote add bret git://github.com/bret/watir.git
git pull bret master
git push