Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Egit: Update a github fork to merge changes of master repo?

Tags:

eclipse

egit

I have forked a github repo. Now my worked repo is out of sync with the original repo.

I understand that I need to do a merge, but how to do this with Eclipse git is a bit unclear to me.

Question: How do I update my fork to include changes made to the original repo made by the owner?


Edit 1: I've added another remote. But I don't see any Pull buttons on the context menu:

enter image description here

like image 908
Valentin Despa Avatar asked Mar 16 '13 18:03

Valentin Despa


2 Answers

You do the merge on your local machine and then push the result from your local machine to your own github repo. There is no way to update your github repo directly on the server.

To do that, add that original github repo as a new remote. This is described in the egit user manual. Choose "configure for fetch" instead and give it the URI of the original repo. Afterwards you can simply use the context menu "Pull" on that new remote node to fetch and merge all the new stuff. After finishing the merge, you "Push to upstream", which is your own github repo.

like image 75
Bananeweizen Avatar answered Sep 17 '22 14:09

Bananeweizen


Try the second url under upstream to push your changes. The first one ist just for fetching (see the green/red arrows ;-)

like image 34
Nameless66 Avatar answered Sep 19 '22 14:09

Nameless66