TomatoCart Repository – Migration to GitHub

Since TomatoCart repository is migrated to the Github from Google Svn, you have to access the repository with Git. I prefer to work with Git and Eclipse. This article discusses how to set up and use eGit (the Eclipse version of Git) with Eclipse Standard 4.3.

Installing Eclipse with PHP and Git

To Install Eclipse with PHP and Git, follow these steps:

  1. Install Eclipse Standard 4.3 from Eclipse Downloads. This will give you a version of Eclipse with Java, XML and HTML file editing (but without eGit or PHP).
  2. To add eGit and PHP, go to Eclipse→Help→Install New Software, as shown below.Eclipse-install
  3. Select Indigo update site as shown below.Eclipse-install-2
  4. This will present a list of all of the available Eclipse plugins. Select the three git options under Collaboration, as shown below.Eclipse-install-03
  5. Select the PHP Development Tools (PDT) and Javascript Development Tools options under Programming Languages:Eclipse-install-04
  6. Then click through the rest of the wizard and accept the terms of the license agreement. At this point, the requested plugins will be downloaded. After this, you will be prompted to restart Eclipse (which you should do).

At this point, you should have PHP and eGit installed with Eclipse. Confirm this by selecting Window→Open Perspective→Other and make sure that the PHP and Git Repositories perspectives show on the list.

Clone the Remote Repository

One easy to way to clone a remote repository is using the Git Repositories view in Eclipse. Here are the steps:

  1. Click the Git Repositories view and then clone a repository as shown below.step1
  2. Then, you have to select repository source. Just select URI and click Next. step2
  3. At this point, we need the URL from Github. We can use either SSH or HTTPS. SSH requires that you have created SSH keys in Github and stored them in Eclipse. Find the desired repository in Github. Here, we use the HTTPS method. Please select HTTPS as the protocol and fill in your Github user name and password, again checking the box “Store in Secure Store”. This is shown below.step3
  4. Select the desired branch and click Next. As you can see, there are three branches in our repository. step4
  5. Next we select the local destination for the repository. This will normally be the same as the project location for the PHP project. The remote repository name defaults to “origin”, as shown in the example below.step5
  6. At this point, the repository should show in the Git Repositories view as shown herestep7

Create the PHP Project

At this point, we have the local repository created. Now we want to create a PHP project in the same directory that we used for the repository. Here are the steps.

  1. Select File→New→PHP project as shown here. Enter the directory for the new project. This will normally be the same as we used for the local repository. Note that we get the warning message indicating that the location already exists. That is expected.step8
  2. Click Finish. We should have PHP project with all of the files from remote repositorystep9

Share the PHP Project

At this stage, we have our local project in Eclipse. However, it is not associated with the Git repository. To do that, we have to “share” the project. Here are the steps.

  1. Right click on the project to show the context menu. Select Team→Share Project as shown below.Git-eclipse-screenshot-11
  2. The Share Project form will show. Select Git and click Next.Git-eclipse-screenshot-12
  3. The Configure Git Repository form will show. Click on the check box “Use or create repository in parent folder of project”. And then just click finish to make the project under version control.

Enjoy it.

Looking for quality TomatoCart Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , | Posted under TomatoCart | RSS 2.0

Author Spotlight

Jack Yin

TomatoCart Developer & Co Founder - Arvixe Web Hosting / TomatoCart Community Liaison

Leave a Reply

Your email address will not be published. Required fields are marked *