The basic steps are:
- Install EGit
- Import Git project
- Create a new PHP project, based on existing code (ie, your Git clone)
1. Install EGit
- In the Help menu, go to Install New Software
- Select your main Update Site from the “Work with” drop-down menu (usually starts with http://download.eclipse.org/releases/ )
- Where it says “type filter text”, type “git”
- Click the EGit checkbox (you may also like to select the EGit Mylyn GitHub Connector!)
- Click Finish & carry out the last few self-explanatory steps.
2. Import Git project
- Right-click and select Import
- Select Git > Projects from Git
(or if you’re using the Eclipse for GitHub plugin (see below) select “Repositories from GitHub”) - Select Local or URI and click Next
- Paste in your Git URI
- Branch selection – select branches you want and click Next
- Local destination – copy the installation path and click Next
- Select Use the New Project wizard and click Finish
3. Create a new PHP project
- Select PHP Project in the New Project which opens and click Next
- Enter your Project Name
- Under Contents, select “Create project at existing location“
- Paste in your Git repo installation path; or browse to, and select the directory your Git repository has been saved in
- 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)