-
Notifications
You must be signed in to change notification settings - Fork 170
Setting up EclipseLink
This is a guide for new users to setup EclipseLink locally for developing and creating pull requests.
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
-
Create a directory on your local system to hold the source code:
mkdir eclipselink\
cd eclipselink\
-
Clone the main repository onto your local system via this command:
git clone [email protected]:eclipse-ee4j/eclipselink.git
-
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 [email protected]:<github-user-id>/eclipselink.git
-
Configure the local repository to push your commits to the fork repository:
git config remote.pushdefault <github-user-id>_fork
This will now pull from origin and push to your fork repository.
-
(Optional) 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 are the 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 [email protected]:/eclipselink.git (fetch)
_fork [email protected]:/eclipselink.git (push)
origin [email protected]:eclipse-ee4j/eclipselink.git (fetch)
origin [email protected]:eclipse-ee4j/eclipselink.git (push)
-
Push the 'master' branch to your fork
git push
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