Skip to content
Harry L. Hoots, III edited this page Jan 31, 2018 · 3 revisions

DRAFT! NOT READY



Step B: Setting up the Open Liberty repository and workspace.

Complete the following steps to setup your Eclipse environment for your Open Liberty repository and workspace. Ensure that you use the eclipse installation which included Bnd Tools.


Step 1 : Create a fork of open-liberty

Navigate to the open-liberty page and click the Fork button in the top upper right corner and select your account as the location to hold the fork. Already have a fork, you say? Well, click the Fork button anyway, and you will see your existing fork.
You need a fork called named /open-liberty , a fork called was-liberty/open-liberty is not what you need for this step and just shows you are a confused admin.


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

NOTE: The following highlighted commands are utilized from a Git-Bash command window. Also ensure that you've started your SSH agent.

*TODO: Add "triangle" image

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

mkdir libertyGit

cd libertyGit

Windows users: Set this config flag to allow file paths to go beyond 260 chars.

git config --global core.longpaths true

Clone the main repository onto your local system via this command. NOTE: We're using git lfs (large file storage) to track some of our large binary files.

git clone git@github.com:OpenLiberty/open-liberty.git

Depending on your network this could take a couple of minutes. If you have any type of failure delete the libertyGit/open-liberty folder and repeat the clone process.

If you run into checkout or SSH issues during the clone, see the Troubleshooting page for help.

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

cd open-liberty

git remote add my_fork git@github.com:<github-user>/open-liberty.git

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

git config remote.pushdefault my_fork

This will now pull from origin, the main repository, and push to the fork, 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.

Finally, the third side of the triangle is pull requests from your fork repo to the main repo.

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

git remote -v

You should see output similar to the following:

$ git remote -v

my_fork git@github.com:naumann/open-liberty.git (fetch)

my_fork git@github.com:naumann/open-liberty.git (push)

origin git@github.com:OpenLiberty/open-liberty.git (fetch)

origin git@github.com:OpenLiberty/open-liberty.git (push)

You will need to setup your 'master' branch since integration is the default:

$ git checkout -b master origin/master

$ git pull

$ git push