Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Forking Eclipse ICE"
(→Pulling from the Master Branch) |
|||
Line 12: | Line 12: | ||
== Pulling from the Master Branch == | == Pulling from the Master Branch == | ||
− | Now you have ICE and a local repository on Github. Unfortunatly, 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 Terminal if using Mac or the command prompt. Navigate to the directory where ice is stored locally (you should have made a local clone somewhere in the previous step). Enter <br><code>git remote add upstream <nowiki>https://github.com/Eclipse/ice</nowiki></code><br>This will set up git to fetch any changes to the Eclipse/ice main repository. Now to synchronize your forked repository with main, enter <br><code>git fetch upstream</ | + | Now you have ICE and a local repository on Github. Unfortunatly, 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 Terminal if using Mac or the command prompt. Navigate to the directory where ice is stored locally (you should have made a local clone somewhere in the previous step). Enter <br><code>git remote add upstream <nowiki>https://github.com/Eclipse/ice</nowiki></code><br>This will set up git to fetch any changes to the Eclipse/ice main repository. Now to synchronize your forked repository with main, enter <br><code>git fetch upstream</code><br><code>git checkout master</code><br><code>git merge upstream/master</code><br> 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 Remotes under your repository in the Git perspective and selecting and selecting '''Create Remote...'''. | In Eclipse, this can be done by right clicking Remotes under your repository in the Git perspective and selecting and selecting '''Create Remote...'''. | ||
Line 26: | Line 26: | ||
[[File:ICEGithubConfig.png]] | [[File: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'''. | + | 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 == | == 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. | 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. |
Revision as of 12:06, 4 June 2015
This page describes the process for creating a fork of the ICE project. This assumes basic simmilarity with Git and that you have a Github account. For working with ICE, the fork will be a copy of the entire repository that you can edit and make changes to. Then, if you propose new content or bug fixes, you can submit a pull request that could be added back to the main ICE prodject.
Contents
Creating the Fork
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. Unfortunatly, 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 Terminal if using Mac or the command prompt. 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 Eclipse/ice main repository. Now 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 Remotes under your repository in the Git perspective and selecting and selecting Create Remote....
Give the new remote a name and select Configure fetch.
Press the Change... button in the upper right to set the URI. Use the URL for the GitHub ICE repository, as shown below.
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.
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.
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.
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.