Using GitHub with Lyo
Setting up a GitHub clone
Rather than cloning the repositories directly from eclipse.org, we recommend you create an account on GitHub and fork the projects repository mirrors there. This will allow you to use GitHub's Pull Request feature to inform project committers when you have a proposed patch or contribution for consideration.
Currently active GitHub mirrors
- Reference implementations for OSLC (RIOs) : https://github.com/eclipse/lyo.rio.git
- Test suites for OSLC: https://github.com/eclipse/lyo.testsuite.git
- Example server projects: https://github.com/eclipse/lyo.server.git
Setting up Git for use with GitHub
Creating a repo on GitHub for use with Lyo
This example will use the Lyo RIO project as an example.
- Go to RIO GitHub page: https://github.com/eclipse/lyo.rio
- Select the Fork button in the upper right to create a new repository on GitHub under your userid
This forked repository is the only one you have write access to - the mirror repo you forked it from is read only.
Clone your GitHub repo on your development system
This example uses EGit in Eclipse
- Go to the Git Repositories view in Eclipse
- Click Clone a Git Repository
- Enter the SSH URL for your GitHub repo - example: ssh://email@example.com/mffiedler/lyo.rio.git
- Complete the wizard
- Now, add a remote for the mirror repository (the one you forked from). This allows you to track and pull incoming changes from other contrbutors
* Expand the lyo.rio repository, right click Remotes->Create Remote * Give it the name upstream and select Configure fetch (you will never push to this remote, only your remote named origin) * Enter the URI for the original mirror you forked (as seen above). This example will use the RIO: https://github.com/eclipse/lyo.rio.git * Click Add for a RefSpec. Pressing space in the Source field should give you the choice master [branch]. Select it and click Next and Finish. Your fetch screen should look similar to this:
* Click Save (or Save and Fetch) * To retrieve upstream changes from now on, go to the Git Repositories view. Expand your repo -> Remotes->'upstream. Right click the entry with the green arrow and Fetch
* Now merge the upstream changes into your local repo. Right click the repository -> Merge. Expand remotes and select upstream/master
* This fetch and merge process is actually much easier from the command line: * git fetch upstream * git merge upstream/master
- At this point, continue on with the directions to build and run the RIO.
Contributing a change
- First, make sure you have a bugzilla open for Product = Lyo at http://bugs.eclipse.org. You can make a request in the bug or on the mailing list that it be assigned to you.
- Code your change. Make sure it is your own code. See Handling Git Contributions
- Commit your change locally and then push it to your origin remote. See instructions above for pushing. origin is your forked repository on GitHub
* Your commit message must include the bugzilla ID and a description of the change
- Update the Bugzilla with a link to the commit on GitHub. e.g.: https://github.com/mffiedler/lyo.rio/commit/689e0e45fb822acd94d5b5ef256e7c581fa555de
- Go to the GitHub web interface and click Send Pull Request