By Mike Hubbartt, © Copyright 2011, All Rights Reserved.

Code repositories are server-based applications to store common code. Our post Configure Mac IDEs to Access a Remote Subversion Repository (June 15, 2011) provides instructions on connecting an IDE to a remote SVN repository (Centralized Version Control System), while our post Configure Mac IDEs to Access a Remote Git Repository (June 24, 2011) provides instructions on connecting an IDE to a remote Git repository (Distributed Version Control System). This procedure covers configuring IDEs for remote repositories once they are setup or they are made available to you.

Configuring Git for Eclipse Galileo

  1. Launch Eclipse.
  2. Select ‘Help/Install New Software’ from the IDE menu.
  3. You are at the Install Screen. Enter (without the surrounding quotes) ‘EGit – http://download.eclipse.org/egit/updates-1.0’ in the field beside ‘Work With:’, then press the ‘Add Site’ button.
  4. Expand the top section (Eclipse Git Team Provider) and select ‘Eclipse EGit’. Press the ‘Next’ button.
  5. Review the items to be installed and then press the ‘Next’ button.
  6. Select ‘I accept the terms of the license agreements’ (if you want to), then press the ‘Finish’ button to install the plug-in.
  7. After the plug-in is installed, restart Eclipse. At the top of the workbench, select the ‘Open Perspective’ button, then select ‘Git Repository Exploring’.
  8. This is the Eclipse Git perspective.

Configuring Git for Xcode 4

Configuring Git for Xcode is a bit more involved than it was to configure this IDE for Subversion. There are two extra processes involved: downloading and installing Git, and creating a symlink to the Git command line tool.

IMPORTANT NOTE. I heard that Git might already be installed as a part of Mac OSX but did not find it on my copy of OSX 10.6.7 (Snow Leopard). If anyone knows that it is pre-installed, please drop me a line to the directory location and I will update this procedure.

Lets get started, assuming we need to download and install Git.

  1. If Git is already installed, skip to step 6, otherwise proceed to step 2.
  2. Download Git. I went to this site and downloaded git-1.7.5.4-i386-leopard.dmg.
  3. Double click on the dmg file to install Git. My copy installed in /usr/local/git/bin.
  4. Open a Terminal, then enter cd .. two times to move to the root (/) directory, then enter cd /usr.
  5. Create the symlink to the Git command line tool: Enter the following command (assuming your copy of Git installs in the same directory as mine – see step 2 of this procedure):
     sudo ln -s /usr/local/git/bin/git /usr/bin/git
  6. Launch Xcode.
  7. Select ‘Window/Organizer’ to bring the Organizer to the screen, then select the Repositories section at the top of this screen.
  8. Select the ‘+’ at the bottom left of the Organizer screen, then select ‘Add New Repository’. At this point, select ‘Type’ and Git is now included in the list (along with Subversion) of supported repositories.  Enter a relevant name and the URL to the hosting site (ProjectLocker in this case, but others can be added for work and school sites as needed).

Advertisements
Comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s