Loading a Git Repository in JDeveloper 12c image 11

Loading a Git Repository in JDeveloper 12c

Does JDeveloper work well with Git is a question I get asked occasionally. Or the question is not even asked and the assumption is that somehow the combination of JDeveloper and Git does not work well. It seems that this assumption is sometimes based on bad experiences from a long time ago – or on prejudice. In my experience, JDeveloper 12c integrates very well with Git. It may not have built in support for all Git commands or offer the same extensive UI features as for example Tortoise does – but for a large part of the daily developer tasks, this integration works well.

To give you an example, this article shows how to get started in JDeveloper 12c with a JDeveloper workspace from a Git repository. In this case, we are dealing with a public repository on Github (https://github.com/lucasjellema/ADFClientSideEventBus) that contains a demo ADF Web application. The objective is to get going with that application in our local JDeveloper environment. All we do is run the JDeveloper Git Clone wizard. This clones the remote repository to a local one and loads the application in JDeveloper. We can subsequently work on the code, inspect all Git meta-data (branches, commit history). edit the sources and make local commits, pull later updates from the remote repository and if we have write privileges on the remote repository, we can push changes as well.

The remote repository we are dealing with:

image

Start JDeveloper.

Select menu option Team | Git | Clone

image

The Clone Wizard opens.

SNAGHTML5371455

Press Next. Specify the GitHub URL for the remote repository. For public repositories you do not need a username and password, at least not until you start pushing changes.

SNAGHTML537e9cd

Press Next. Select all branches to clone locally. In this case, only one branch is defined in the repository.

SNAGHTML5385194

Specify where on the local file system the repository should be cloned. Specify a name for the local repository.

SNAGHTML538c156

Press Next. A summary is presented.

SNAGHTML538f1d8

Press OK. Now the Git Clone operation commences.

SNAGHTML5393b17

When cloning is done, JDeveloper will immediately open the workspace.

image

There it is, all the code that was in the remote repository on GitHub, cloned locally to the file system and ready to run in JDeveloper. By running a simple wizard that required two pieces of information: the URL of the remote repository and the destination directory on the local file system.

Note: The Versions window provides an overview of some of the Git meta data:

image