views:

2094

answers:

2

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.

+3  A: 

Simply add original repo as a remote and merge your fork with it; then push merged fork to github.

There's also a ruby gem for easier github operations. You can merge upstream with one call...

Marcin Gil
I see that I forgot to add that I am new to git and github, and that I need specific commands how to do it.Thanks for github-gem, but that is overkill for me.
Željko Filipin
+13  A: 
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
Željko Filipin