Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Forking Eclipse ICE

Revision as of 16:02, 24 February 2016 by Tcpatt.gmail.com (Talk | contribs) (Pulling from the Master Branch)

This page describes the process for creating a fork of the ICE project. These instructions assume a basic familiarity with Git and that you have a GitHub account. Forking ICE will create a copy of the entire repository that you may edit. Then, if you propose new content or bug fixes, you can submit a pull request that could be added back to the main ICE project.


Creating the Fork

Github Fork Example.png

Go to the GitHub ICE repository and log in to GitHub. Press the "Fork" button in the upper right hand corner of the page, as shown above.

Cloning the Fork Repository

Follow the instructions for cloning the Git repository, but instead of https://github.com/eclipse/ice.git, use https://github/[your username]/ice.git as the URI. Now you will be able to make commits and push your changes to your own fork repository on GitHub.

Pulling from the Master Branch

Now you have ICE and a local repository on GitHub. Unfortunately, your new forked repository will not automatically synchronize with the master ICE repository. Git needs to be set up to fetch the changes from master so that your repository stays up to date. First, open a terminal window. Navigate to the directory where ICE is stored locally. (You should have made a local clone somewhere in the previous step.) Enter


git remote add upstream https://github.com/Eclipse/ice

This will set up git to fetch any changes to the ICE main repository. To synchronize your forked repository with main, enter

git fetch upstream
git checkout master
git merge upstream/master

Now your copy of the repository will stay up to date without losing any of your unique changes.

In Eclipse, this can be done by right clicking your repository in the Git perspective and selecting Remotes > Create Remote....

Eclipse Ice Create Remotes Example.png

Give the new remote a name and select Configure fetch.

Eclipse Ice Remote URI Example.png

Press the Change... button in the upper right to set the URI. Use the URL for the GitHub ICE repository, as shown below.

ICEGithubConfig.png

Save your changes. From now on, you can fetch the latest changes from the master branch by right clicking your repository in the Git perspective and selecting Fetch from Upstream or by right clicking your project in the Package Explorer and selecting Team > Fetch from Upstream.

Issuing Pull Requests

First, commit your changes to your branch by right clicking your repository in the Git Perspective and selecting Commit, or by right clicking your project in the Package Explorer and selecting Team -> Commit. Write a message describing your changes and press the Add Signed Off by button to sign the message. Then select all the files whose changes you wish to commit and press the Commit and Push button.

Eclipse Ice Commit Example.png

In order to contribute to Eclipse, you must sign a Contributor Licence Agreement. If you have not already done so, go to the Projects Forge, create an account, and click on the Eclipse CLA link in the upper right. The email address used in this account must match the email used for the commit.

Once you are ready to submit the pull request, return to GitHub. From your repository page, http//github.com/[your username]/ice, go to the pull requests link on the right, and click the New Pull Request button.

Eclipse Ice Pull Request Example.png

This will bring you to a page listing all the changes you have made, compared to the code in the up to date master branch.

Eclipse Ice Pulle Request Comparision Example..png

Press the Create pull request button to open a dialogue box with the commit message you wrote when committing to your branch. You may edit this message before submitting it to the master branch's owner for review. When done, press the Create pull request button again to submit your changes for consideration.

Back to the top