Git = a tree. Most (all?) labels refer (directly or indirectly) to a node in the tree. A node is identified uniquely by an SHA1 hash, which is generated from both the file system contents and the meta data. A node can have both N parents (google octopus merge) and/or N children, though the norm is 1 or 2 parents and N children, with N usually = 1. The files you see are just the physical representation of the node. You can move around in the tree by referring to labels or hashes directly. You can manipulate which node a particular label refers to by various commands such as commit, merge, rebase and reset. Labels exist as, at least, local branches, remote branches, tags. There is no magic. You’re probably over complicating it in your mind.
Jan
19
Leave a Reply