Installation
Install Egit
Install “Maven Integration for Eclipse”
“Import…” -> “Checkout Maven Project from SCM”
“”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
“Import…” -> “Checkout Maven Project from SCM”
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
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)
“Team” -> “Commit”
“Commit” to commit locally (you need to push later), or “Commit and push” to commit directly to the repo
Share a project
- “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
Go to the project page, es: https://github.com/smartcampuslab/android.journeyplanner.lib
Select HTTP and copy to clipboard the URL for the .git file, es: https://github.com/smartcampuslab/android.journeyplanner.lib.git
“Import…” -> “Git” -> “Projects from Git”
Select “URI”
The next form will be filled; add your Github username and password, then next
Select all the branches, next
The destination directory suggested is fine, the initial branch “master” too. If the project contains submodules maybe you want to check “Clone submodules”
Now with the Wizard import existing project, next
Select the project, finish!