Tag Archives: subversion

How to change the Git user pictures in Xcode


Those little avatars / user pictures in Xcode are linked to your Mac Contacts. This is not a Git or SVN feature.

You can associate a Mac Contact with a committer in Xcode and make it show up under Source Control – History. If the contact has a picture and you associate that contact with a Git committer then Xcode will show it in History. Here’s how it works in Xcode 6:

  • in Source Control – History, hover over the name of the committer
  • click on that super teeny tiny disclosure triangle
  • from the drop down menu, select Add to Contacts
  • you can now create a new contact, including a picture, or “Choose existing” and pick a contact
  • confirm your choice and the icon shows up in your project

Xcode isn’t clever enough to apply the same committer contact to all your projects so you need to repeat this process for each project.

In the same manner you can replace and update contacts.

How to add version control to an existing project in Xcode

Setting up a local GIT repository:

Open Terminal and change to the directory where your project is located (cd /path/to/your/project). Then use the following shell commands:

NOTE: as of Mountain Lion you need to install the Xcode Command Line Tools for this to work (under Xcode Preferences – Downloads – Components).

Setting up a local SUBVERSION repository:


Subversion cannot place an existing directory under version control. Instead you need to create a new directory which serves as the subversion repository. You then checkout a working copy from this repository, work with it and then commit your changes back to the repository.

  • Open Terminal and and create a new directory to hold your repository (i.e. mkdir repos)
  • inside this directory create three sub-directories called trunk, tags and branches (i.e. repos/trunk, repos/branches, repos/tags)
  • copy your existing Xcode project into the trunk folder
  • enter ‘svnadmin create’ inside your main repository directory (i.e. in repos)
  • enter ‘svn import’

NOTE: Subversion has one extreme drawback: it sucks. Again for any of this to work in Mountain Lion you need to install the Xcode Command Line Tools (under Xcode Preferences – Downlaods – Components).