Environment Setup (Eclipse Indigo / Juno)

Installation

  1. Install Egit

  2. Install “Maven Integration for Eclipse”

  3. “Import…” -> “Checkout Maven Project from SCM”

  4. “”Find more SCM connectors in the m2e Marketplace”, install the Git connector (m2e-egit Maven SCM Handler for Egit by Sonatype Inc), restart

Usage

Maven

Pull from repo

  1. “Import…” -> “Checkout Maven Project from SCM”

  2. Select Git in the dropdown menu and get the SCM URL from the repo page. Es: for https://github.com/smartcampuslab/smartcampus.vas.commons, the url is https://github.com/smartcampuslab/smartcampus.vas.commons.git

  3. Choose the directory to pull the project into (I suggest a subdirectory of your eclipse workspace. Change “Preferences” -> “Git” -> “Default repository folder”)

Commit (local or to repo)

  1. “Team” -> “Commit”

  2. “Commit” to commit locally (you need to push later), or “Commit and push” to commit directly to the repo

Share a project

  1. “Team” -> “Share Project…” -> “Git”

Important: if you don’t check “Use or create repository in parent folder of project”, Git will move the project in its directory (“Preferences” -> “Git” -> “Default repository folder”)!

Android

Hint: use your workspace directory as Git folder

  1. Go to the project page, es: https://github.com/smartcampuslab/android.journeyplanner.lib

  2. Select HTTP and copy to clipboard the URL for the .git file, es: https://github.com/smartcampuslab/android.journeyplanner.lib.git

  3. “Import…” -> “Git” -> “Projects from Git”

  4. Select “URI”

  5. The next form will be filled; add your Github username and password, then next

  6. Select all the branches, next

  7. The destination directory suggested is fine, the initial branch “master” too. If the project contains submodules maybe you want to check “Clone submodules”

  8. Now with the Wizard import existing project, next

  9. Select the project, finish!