Give the gift of Drupal. All merchandise is 50% off through 2016.
Add Git support to Eclipse
Install the EGit plug-in through the Eclipse Marketplace. In Eclipse, choose the "Help" menu, then "Eclipse Marketplace". Search for "EGit" and install the plug-in. Eclipse will need to restart after installation.
Activate Git client support on a project
Open the Project Explorer View in Eclipse. Right-click the project name, and choose Team > Share Project. Pick Git as the service, and on the next screen do one of the following:
- If you already have tied a project to a Git repo then check the box that says "Use or create project in existing parent folder." This lets Eclipse know there is already a local .git folder within the project folder.
- If no Git connection was made outside of Eclipse then continue with the standard steps of the wizard.
Once Eclipse knows Git is used on the project the Team contextual menu options change to support commands and features suck as Branch, Add, Commit, Push, Pull, Fetch, Merge, Rebase, Tags, and so on.
Adding Quickstart sites to Eclipse
By default, the Quickstart workspace for Eclipse is the "websites" folder so when someone tries to add an existing site using the "New PHP Project" wizard and error the desired folder is already in the workspace. The solutions are somewhat simple but not apparent.
Option A: Use proper workspace name (a.k.a. stop choosing "existing folder")
The key to adding an existing Quickstart site in Eclipse is not to choose the project to have an existing source. Leave the selection to use the default workspace and type in the EXACT name of the Quickstart site or domain as the project name. If you get an empty project folder in Eclipse then you didn't type the site name properly. To add the example site that comes with Quickstart, add a "New PHP Project" and type "example.dev" as the project name. Click Finish.
NOTE: If you remove a project in Eclipse and choose to delete the files, Quickstart will retain the domain and database for that site. Instead, use Drush to remove a Quickstart site; it's a better option and strongly recommended.
Option B: Move or delete the default Workspace path
Click Window > Preferences, then choose General > Workspace > Startup & Shutdown. Choose the Quickstart default workspace that points to the "websites" folder, and choose "Remove", then "Apply", then "Ok". You can choose to add or change the path here or just restart Eclipse and let it ask you where you want the new default workspace folder to be - make sure it's not the "websites" folder. Tell Eclipse to stop bugging you and get back to work.