XCode and TFS integration in 8 simple steps

After 2 years away from my blog, I will try and write a post which I expect will help people in my office as well as other around the globe. It all began when I saw that XCode has an option for code comparisons and status of the files but it was not usable with TFS and using eclipse was just too “tidy”. You will have to keep track of the files to checkout for edit, keep track of files to add so you dont miss it in checkin etc. So here I present to you an easier way (GIT-TF).

Step 1) Download git-tf from the following link

Step 2) Unzip it in some folder on your local disk. Let us call the folder git-tf (because I have it by the same name on my system) for my ease :)

Step 3) Now you need to clone your TFS code to your local folder. So suppose you are working on some module and its code is mapped to a folder “XTensions/abc” (it is important that you have it mapped using eclipse like you normally do) then you now need to clone it using git-tf. To do that, first delete the folder “abc” in XTensions. Then go to terminal and write the following commands: (replace paths with your own disk path wherever necessary)

pushd /Users/satinderrana/Documents/SomeArbitaryPath/XTensions/
git-tf clone http://myserver:8080/tfs/mycollection $/TeamProjectA/XTensions/abc


If the above commands give you error that you cannot connect to tfs due to proxy, then turn off the proxy, relaunch terminal and try again.

Step 4) Now when you work on any file and change it, it will display its status as “M” if it modified. “A” if it is added etc. See the screenshot below.

Screen Shot 2013-06-26 at 2

Step 5) You can also choose to see only the files which have changes by filtering it by the button at the bottom

Screen Shot 2013-06-26 at 2


Step 6) You are all set now. So when you are done making changes just checkout the files which have some status “Modified” or “added” etc and checkin the files using eclipse like before.

Step 7) Updating your code. The most important and tricky part is this. When you need to update your code (get latest code), all you need to do is go to eclipse and choose “get latest version” like you must be doing right now. But after that come back to xcode, enable the filter to see what all has changed (changed files will have some status) and then right click > choose “committ selected files” from contet menu. See below.

Screen Shot 2013-06-26 at 2


Then add any comment you want, I usually write “Merging changes from <branch name>”. And your code is updated

Screen Shot 2013-06-26 at 2


Step 8) Lastly, if you are working on the file and you need to check what changes you have made. you can do that from within XCode now. Just use the last button in toolbar below

Screen Shot 2013-06-26 at 3.00.00 PM



Here you go. Let me know if you need help with anything in the comment section below. Happy coding. :)

Leave a Reply



  1. W

    >”it is important that you have it mapped using eclipse like you normally do”
    What if we’re not using eclipse? At all. And why would we be using eclipse if we’re coding in xcode? Do you have modified instructions for people who are Mac objective C programmers that don’t use Eclipse for Objective C development?

  2. admin

    Hi W,

    I checked out microsoft support sites and they do not provide direct integration with XCode for the reason that XCode does not provide native support to hook into the repositories. So this is the best I could get out of it. If you find a better solution I would love to share it with the readers.

  3. Aladdin

    Hey Bro thx for nice tutorial, It solve lot of problem But I still have issue that .pch file is always ignored so my team can’t build the xcode project :/ Any Idea will be appreciated …

Next ArticleKeep the romance alive