9

We want to work together on one project, checking out/in files.

Some devs recommend git, others prefer Mercurial. Does anyone have experience with both and can tell why I should spent time on Mercurial which doesn't integrate with Xcode rather than just using git which does integrate?

What are the benefits when I would use git instead of Mercurial? And what are the benefits when I would use Mercurial instead of git?

Last but not least: Is there a quick guide that shows how to set up git so that multiple machines & Xcodes can start working on the same project?


big = 5 people (yeah, for me that is huge, really) ;)

Proud Member
  • 40,078
  • 47
  • 146
  • 231

1 Answers1

14

git and Mercurial are very similar in nature. They are both DVCS and have subtle differences only.

See : http://hginit.com/ for a good fast overview and setup. Check if you like how it is going to be working with Mercurial

See their subtle differences here : https://www.mercurial-scm.org/wiki/GitConcepts
And also some views form the other side : http://whygitisbetterthanx.com/

It is very easy to get started on both.

I prefer Mercurial because it is easy to fit in the head. The basic operations suffice. The sheer number of command variations in git usually puts me off. It feels a bit more indulgent.

How ever, as you have noted. Xcode integration can be a differentiating factor for you.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
pyfunc
  • 65,343
  • 15
  • 148
  • 136
  • @BugAlert: Yes, I do. :) I have earlier used subversion too but I have never been a big fan of the IDE VCS integration. In fact, slowly, you feel more powerful using the command line approach. this has been my experience. – pyfunc Nov 22 '10 at 22:57
  • 1
    A couple of things that annoys me about that "Why Git is better than X" page. 1) The cheap branching section applies just as much to hg as git. Mercurial has lots of ways to do branching. http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/ 2) Github is good, but so is Bitbucket, and I get the impression Bitbucket is getting love and attention now it's been acquired by the Jira folks. – Paul S Nov 24 '10 at 12:00
  • @Paul S: Frankly, I concur with your opinions. It feels like a "Ruby on Rails" campaign. I simply love the way of Mercurial, a simple subset and more control via extensions, many of which runs within the same python process hence is indistinguishable to other hg commands. – pyfunc Nov 24 '10 at 17:48
  • 3
    The trouble with the "Xcode integration" benefit is that Xcode's version control UI is so shallow that you'll invariably need to revert to the command line as soon as you start wanting/needing to take advantage of additional features in your DVCS. For those wishing to use DVCS without learning _any_ command line syntax, there's the brilliant-and-free MacHg. If you simply must use git, you should install a secondary git client to supplement your learning; SourceTree is free on the Mac App Store as of this writing. These are the best $0 clients I've encountered so far. – clozach Dec 29 '11 at 13:56
  • 2
    You can use Mercurial directly within Xcode 4 after installing this patch: [xcode4-with-mercurial](https://bitbucket.org/hsivank/xcode4-with-mercurial/overview). Xcode is then able to handle both git & Mercurial repositories. – rsebbe Apr 24 '12 at 20:10
  • 1
    To complement my previous comment, we just released a plugin for Xcode that makes it even easier to handle Mercurial repositories. Here's the link: https://bitbucket.org/creaceed/mercurial-xcode-plugin – rsebbe Jul 27 '13 at 06:40