6 ms·
Not only that it has branches -- it has four different ways to branch. http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/ http://stevelosh.com
by BerislavLopac 8y ago
Not only that it has branches -- it has four different ways to branch. http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/ http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-me...
- masklinn 8y agoOf note: Git has 3 of those: * git has clones * git has bookmarks, that's "normal" git branches * git has anonymous branches, it's called "detached head" and is completely broken * git does not have named branches (that's the branch name being part of the commit's immutable metadata)
- dtech 8y ago> the branch name being part of the commit's immutable metadata To a git user, what's the rationale and when is this useful?
- lixtra 8y agoWhen you want to know were some commit came from. For example you can make a seemingly unrelated change in a feature branch. And then later wonder why this change has been done. Of course you could hope to find the merge into master where the feature name could be mentioned. But it’s nicer to have it on the commit. => it gives extra context to the commit
- BerislavLopac 8y agoWell, considering one is broken I would still argue that it has two, just as the article states. Not that it needs much more -- git branching works perfectly fine. That said, I'm somewhat disappointed that cloning has fallen out of favour and it's standard to use an upstream server (usually GitHub) not only as a central authority but also as intermediary for sharing code. Apart from "forking", cloning repos has practically been delegated to history.
- krupan 8y agoI've seen plenty of git users put "[JIRA-1234]" at the beginning of a string of commit messages. That's basically poor-man's mercurial named branches.
- chopin 8y agoIsn't that what a tag int Git is for?
- deleted 8y ago[deleted]
- BerislavLopac 8y agoA tag applies to an individual commit, and is unique (i.e. you can't have the same tag on multiple commits); a named branch is applied to all commits in a branch and persists after merging. In the example mentioned by @krupan, the users tend to (and some team even require it) prefix each commit with the ticket name or similar identifier.