9

I have a question, the answer isn't really hard technically, but I am more looking for the experience of most advanced programmers here.

So like many noobs, I am doing my version control in the crappiest way, which is to copy paste my project directory and rename it with the current date/time. You will agree that it's a quite limited solution :P

I decided to learn version control system(s), but I am facing many choice, and I would like to know what are the best for your points of view ?

  • Using Xcode integrated version control (git or anything else), with organizer, cloning, commits from xcode etc. I mean totally or almost controlled by Xcode ?
  • Ignoring Xcode letting him think there no version control and doing it myself in command line ?
  • A merge of the two above ? How ?

And then :

  • Using git ? Github is very popular and powerful, but you must learn git, and learn it hard.
  • Mercurial ? It seems more friendly.
  • Something else ?

It would be priceless to have some feedbacks about more experienced people, so that me and many others I hope can choose their paths when facing the VCS wall :-)

Thanks a lot !!!

danyowdee
  • 4,658
  • 2
  • 20
  • 35
Mustapha-Tarek
  • 111
  • 1
  • 9

4 Answers4

7

First: Use a VCS at all.

The rest: Mercurial is nice, but Apple went with Git for Xcode. So if you want source control integration within the IDE, Git is the best option.
The things I miss most when working with Xcode & Mercurial are the "Modified" indicators in the source list and the integrated diff-viewer. (Which is pretty good in Xcode IMO)

The actions you perform in the Organizer are a bit limited at the moment, but you can always fall back to Terminal.app for that.

Thomas Zoechling
  • 34,177
  • 3
  • 81
  • 112
  • 1
    When I tried to set up git & github with Xcode (very fastly) I wasn't able too to have those little squared 'M' in front of modified files, I'll check it later. In fact even the VCS menu was disabled in Xcode, only the option allowing to browse repositories was enabled, all the others (commit, diff etc.) were in gray. – Mustapha-Tarek May 01 '11 at 13:20
  • "First: Use a VCS at all." +1 There is one catch with the diff-viewer: It let's you make edits in each and every version you are comparing. It even lets you save those changes...problem is: It won't tell you _where they go_ straight away! (Hint: use "Save As..." over "Save" to find out/change the "where". The default is somewhere in /var/tmp/$randomAlphanumericSequence/...good luck finding that any other way!) – danyowdee May 01 '11 at 13:46
6

I can only recommend git. Merging is easy, I remember the days when a merge conflicts occured with SVN, it was pain, horrible pain to resolve those. You can easily start a local repository with git, especially if you are the only one developer.

Have a look at Which SCM system to use with Xcode 4 for a lone developer?.

I suggest some reading on git for the beginning:

Community
  • 1
  • 1
Nick Weaver
  • 47,228
  • 12
  • 98
  • 108
2

Take some time to invest in learning the basics of git, it's absolutely no rocket science to get you started on basic usage and you will benefit from it right away. Once you know the basics of git, you aren't locked into another tool wrapping git, you can use git if there are some problems with XCode. Also, git is available for several OS so the knowledge you gain about git will not go away if you move between different computers that have different OS.

Here are my best of bookmarks for git:

http://www.delicious.com/Ralphtheninja/bestof+git

rtn
  • 127,556
  • 20
  • 111
  • 121
0

I've had good success with SubVersion.

Richard Brightwell
  • 3,012
  • 2
  • 20
  • 22