() Alan Mackenzie () Fri, 14 Nov 2014 23:02:36 +0000 > Because in GIT commits are not on a branch. All commits are > arranged into DAG, and branch is just a pointer into the DAG. > Any given commit is either reachable from given branch or > not. It's that simple. I think you're just playing with words, here. We all know what a branch is, Terminology differs between VCS models. For RCS and conceptual derivatives, a "branch" is a series of commits, and a commit can be viewed as "contained in" or "belonging to" a branch; in the DAG, "branch" includes both vertice and edge information. For Git, a "branch" is a vertice label only (edge information lies in the "commit object"). Changing a label has no effect on the commit or the edge info, and you can have more than one label on a commit. and git knows which revisions are on which branch (or branches?), otherwise your command below couldn't work. It "knows" it, sure, but if the way it knows it and the way you think it knows it differ, you will remain confused. I read some time back "Git for computer scientists" (or maybe it was "for Lisp programmers") that explained the above, more elegantly. I can't be bothered to search for it now; perhaps someone has a link handy? -- Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) => nil