Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The thing you have you to understand about git is that branches are essentially merely commit bookmarks. The fact that you were on the <code>foo</code> branch when you made the <code>0deadbeef</code> commit is immaterial to the commit itself; the branch is not part of its identity.</p> <p>(Mercurial bakes the branch name into the commit. <a href="http://www.rockstarprogrammer.org/post/2008/apr/06/differences-between-mercurial-and-git/" rel="noreferrer">In a variety of ways, this is inferior, as Dustin Sallings explains</a>.)</p> <p>Even assuming that <code>git describe</code> would just use the currently checked out branch – if you have a mergy history, there could be multiple paths leading to the same most recent tagged commit that <code>git describe</code> would use. So there isn’t even necessarily any <em>one</em> branch.</p> <p>Another note: you may object that even if “3rd commit from tag X” is ambiguous in the general case, <code>git describe</code> could just look at the graph and figure out whether it <em>is</em> ambiguous and if not, leave out the hash. However, there is nothing stopping anyone starting a branch on top of that tag at a later time – so then your <code>describe</code> string would become ambiguous <em>retrospectively</em>.</p> <p>Bottom line is that the <strong>only</strong> unambiguous identifier of a commit is its hash. So that must be in there. What <code>git describe</code> does is add some <em>redundant</em> (and in case of the commit number, ambiguous) information that makes the description more useful to the kind of spatial/relational comprehension that humans orient themselves with, within the confines of the Git model.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload