Skip to content

Development conventions: eclipse and git

spheras edited this page Sep 4, 2014 · 11 revisions

Eclipse And GIT

We aim you to use eclipse with git plugin.. These are the instructions to work with GIT in eclipse, but we really aim you to use git independently from eclipse. In any case this is our experience with git in eclipse at first stages:

EGit is installed in Eclipse Juno version by default, so it's very easy to use. Can i work with another ide or git software? Sure! this is only a recomendation, or the way we use to do it.

These are the necessary steps to work with eclipse and egit:

  1. JDK: You will need a JDK to compile project.. Installation of the JDK is out of this scope. We are working with 1.6 minimum specification. No tested yet with 1.7 (can you please?)

  2. Eclipse: Download the latest version from the eclipse web page. At the moment i'm writing this wiki the last version is Eclipse Juno. We encourage you to download the "Eclipse IDE for Java Developers" version.. but you can do whatever you want. Decompress the binary and install it whatever you have all software.

  3. Workspace: Launch eclipse and select workspace. Our recommendation is to create a new workspace called messic. Something like this:

/home/myuser/develop/workspaces/messic

  1. Git repository: Eclipse will open the workspace, and you need to clone the git repository. Click on Window->Open Perspective->Other ... option. You will open a list of available perspectives. Select Git Repository Exploring After that you have a new tree exploring where you can clone a Git repository. Click on button "Clone a Git Repository and add the clone to this view" The next window will ask you the name and location for the cloned repository. Remember that you need to clone, make a full copy of the remote repository into your local disk. You must copy the url to github messic, this url is at the home messic project in github.. https://github.com/spheras/messic.git So, put it in the eclipse window asking you the url for the cloned git project and complete the user and password fields (you must be a registered github member in order to download the code).. press next After that, the clone window will ask to you what branches to clone, it's only necessary the master branch (for the moment).. press next again The last page for this clone wizard window ask to you the destination folder. My suggestion is: modify the directory and put at the same level of your new messic workspace.. i mean: if your workspace is under: /home/myuser/develop/workspaces/messic,then put the git folder at: /home/myuser/develop/workspaces/messic.git. That's all, press finish
  2. Eclipse Project: It's useful to have a basic eclipse project with all the project structure.. To do this, go to File->new->Project->General->Project. At the new window put a project name like: _messic_git. Uncheck 'use default location' and browse to the previously git location (for instance: /home/myuser/develop/workspaces/messic.git... This will create a basic project with all the structure.. It's useful to get a comprhensive overview of the project and files outside the java scope.

That's all, the last note is about the ignore files.. Remember! If you create a new project, you MUST ignore all eclipse project files like .project, .classpath, bin folder, target folder, ... We only upload the source code and related.. non binaries (generated), non eclipse files, or other similar files. THANKS!