This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Blogs » Geoff Bentley » Setting up a Git-based PHP project in...


Setting up a Git-based PHP project in Eclipse

Wednesday 22 August 2012 11:47:25 am

  • Currently 5 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Eclipse IDE + Git + PHP is a powerful combo - this tutorial shows you how to get them working together (and assumes you already have Eclipse (PDT) installed).

The basic steps are:

  1. Install EGit
  2. Import Git project
  3. Create a new PHP project, based on existing code (ie, your Git clone)

1. Install EGit

  1. In the Help menu, go to Install New Software
  2. Select your main Update Site from the "Work with" drop-down menu (usually starts with )
  3. Where it says "type filter text", type "git"
  4. Click the EGit checkbox (you may also like to select the EGit Mylyn GitHub Connector!)
  5. Click Finish & carry out the last few self-explanatory steps.

2. Import Git project

  1. Right-click and select Import 
  2. Select Git > Projects from Git
    (or if you're using the Eclipse for GitHub plugin (see below) select "Repositories from GitHub")
  3. Select Local or URI and click Next
  4. Paste in your Git URI
  5. Branch selection - select branches you want and click Next
  6. Local destination - copy the installation path and click Next
  7. Select Use the New Project wizard and click Finish

3. Create a new PHP project

  1. Select PHP Project in the New Project which opens and click Next
  2. Enter your Project Name
  3. Under Contents, select "Create project at existing location"
  4. Paste in your Git repo installation path; or browse to, and select the directory your Git repository has been saved in
  5. Click Finish

That's it!

As a bonus, here's a couple of Eclipse plugins you may find useful:

  • Symfony2 (includes Twig & YAML support)
  • eZ Publish (includes template syntax highlighting & validation, content class browser, and template operator wizard)
  • Eclipse for GitHub (download Eclipse + EGit + EGit Mylyn GitHub Connector)
Proudly Developed with from