News for hackers. Stuff that matters.
Re:Confessions of a Git Skeptic by ekimekim on Wednesday February 20, 2013 @01:39PM (#5252306)
Sequential commit numbers? How does that work with branching? Or other people's commits? eg. I commit #100, you commit #100, you pull my commit, now we have duplicate identifiers.

Git commit ids are a hash of the commit content. This has very nice properties in that:

- Ids are duplicate if and only if the commit is identical (the collision chance is so low it's not worth considering)

- It's content-addressable

And you can refer to it by any unique prefix, so it's not a pain to type out (and you should only rarely be typing out particular commits instead of branches or tags).

Re:Confessions of a Git Skeptic by lucian1900 on Wednesday February 20, 2013 @01:46PM (#5252379)
Mercurial has local sequential commit numbers. The hashes are of course what one must use when others are involved.