Archives de catégorie : eclipse

Creating and applying a patch for an Eclipse project with Git, part 2 : using github

In a recent post, I described how to contribute a patch to an eclipse project using git as its version control system.

Patches are OK, but you lack all the social aspect that is enabled with git and its tooling (be it pure git + gerrit or github with the comments on commits and pull requests)

As of today, pull requests are not accepted by Eclipse committers since they lack IP (Intellectual Property) information, and the official git repositories at eclipse are hosted by the foundation not on github (github repositories of Eclipse projects exist for mirroring only).

Recently talking with a committer on the Eclipse Tycho project (Tobias Oberlies not to name him), he suggested to me to share my contributions via github, instead of attaching patches, as long as the git contribution scenario is followed

To comply with this suggestion,

1. I would clone the official repository at git.eclipse.org

2. work on my changes, test them, add them, and commit them for each functional change

3. create a new repository on my github account

4. synchronize my new github repo with the official tycho repository

« behind proxy » users can use https access instead,

5. push my committed changes to my github repository

6. add a comment to the bugzilla entry describing the fix or new feature I worked on, giving the github commit id

7. accept the IP conditions of the Eclipse foundation

That’s it ! you just contributed some code to a cool Eclipse project !
OK, it seems more complicated than just submitting a patch or a pull request, but once your local repo is set up,
you should have something like :

and it is just a matter of juggling between the original repo, synchronizing the latest changes

and the github repo (pushing the latest changes)

and copying/pasting the commit ids to the bugzilla entry.

I’m still relatively new to Git, so if you think there are better ways to sync the repositories, then please add a comment to this post !

To go deeper on that topic :