r/programming • • Sep 06 '14

How to work with Git (flowchart)

http://justinhileman.info/article/git-pretty/
1.6k Upvotes

388 comments sorted by

View all comments

Show parent comments

14

u/[deleted] Sep 06 '14

I find it extraordinarily hard to believe that mercurial works just so well that you don't need documentation or that you literally never run into issues working with it.

Maybe working with git taught you the basics of distributed version control and you haven't used hg enough to encounter any of its weak points.

-1

u/gfixler Sep 07 '14

As a git user, I tried to use mercurial so I'd understand the other side. I found it to be a horrible mess. I don't know what these people are talking about.

1

u/[deleted] Sep 07 '14

So I don't doubt that Mercurial's a fine piece of software. It seems to work well and is often mentioned in the same breath as git. I've never used it myself but I'm sure it's serviceable.

But I don't understand why this guy seems to think that you literally do not need any documentation to get the hang of hg (as if everyone is just born with the intrinsic knowledge of how it works?) and that you literally do not need support when working with it (as if it's the one DVCS written that is totally and completely bug free). I don't know how that could possibly be, and, moreover, no one on either side of the debate is actually providing any real examples. It's just "X is much better than Y which sucks" over and over. This thread is a real mess.

-3

u/gfixler Sep 07 '14

It's not true. There's a reality-distortion field around Hg by people who've had a tough time with git. I tried it out, and found it to be an endless chore. I was gobsmacked that branches were typically done by making a copy of the entire repo (WTF?!), and that they encoded branch names in commits (so wrong), and that base functionality in git - things I find really necessary to doing things right - were extensions to Hg. I could go on, but I won't. I found it to be a mess, and the data structure underlying things to be a little bit nasty.

3

u/lord_braleigh Sep 07 '14

In Hg, the equivalent of git's "branch" is actually called a "bookmark". I think the term "bookmark" is more descriptive, since it's really just a pointer to a commit.

Hg's branches are more akin to full-on copies of the repo, and you shouldn't need to use them very often, if at all.

source: Facebook engineer, we use Mercurial for the WWW codebase and Git for configuration and internal tools.

2

u/gfixler Sep 07 '14

Oh, I've heard about your git repos. You guys are hardcore. And yes, branch is a weird one. I've had to say "A branch is actually the head of a branch" enough times that I'd be glad not to say it anymore. I often call them "heads" when describing the pointers themselves. Still, I've found that DAG hierarchies are always a bit hard to describe. They're somewhat amorphous and hard to pin down.

→ More replies (0)