Skip to content

Setting up EclipseLink

Will Dazey edited this page Mar 20, 2018 · 5 revisions

How to Setup EclipseLink

This is a guide for new users to setup EclipseLink locally for developing and creating pull requests.

Step 1 : Create a fork of eclipselink

Click the Fork button in the upper right corner and select your account as the location to hold the fork. If you already have a fork, click the Fork button anyway to view your existing fork. A suggested name for your fork is:

<github-user-id>/eclipselink

Step 2 : Setting up an inbound/outbound "triangle"

First, create a directory on your local system to hold the source code:

mkdir eclipselink\master\

cd eclipselink\master\

Clone the main repository onto your local system via this command:

git clone git@github.com:eclipse-ee4j/eclipselink.git

Next, setup the second side of the triangle via this command (ensure you change <github-user-id> to your GitHub user name (this is your external github.com user):

cd eclipselink

git remote add <github-user-id>_fork git@github.com:<github-user-id>/eclipselink.git

Next, configure the local repository to push your commits to the fork repository you created above:

git config remote.pushdefault <github-user-id>_fork

This will now pull from origin and push to your fork repository.

This option requires at least Git 1.8.4. It is also recommended that you configure

git config push.default simple

unless you are already using Git 2.0 where it is the default. You can check your git version with the following command:

git --version

The third side of the triangle is pull requests from your fork repository to the main repository. This will be accomplished when your pull request is merged after a code review.

You can run the following command to verify your triangle was created successfully:

git remote -v

You should see output similar to the following:

_fork git@github.com:/eclipselink.git (fetch)

_fork git@github.com:/eclipselink.git (push)

origin git@github.com:eclipse-ee4j/eclipselink.git (fetch)

origin git@github.com:eclipse-ee4j/eclipselink.git (push)

Finally, push the 'master' branch to your fork

git push

(Optional) Step 3 : Checking out other EclipseLink branches

If you plan on creating pull requests for previous EclipseLink versions (ie. '2.6', '2.7'), you will need to checkout these branches into your local repository.

git checkout -b 2.7 origin/2.7

git checkout -b 2.6 origin/2.6

Next steps:

Clone this wiki locally