If you’re a developer who has been putting off understanding how Git works under the hood, then this guide is for you. For those of us who get by with only knowing a few commands, Git can be a little mystifying:
Not much new here (I think I saw nearly the same description of Git history a short while ago), and there are a few factual errors in there - or at least parts that are not clear.
The “tree” objects have nothing to do with the tree command, and nothing to do with how repo objects are stored on the filesystem. You can display tree objects with “git cat-file-p” (just like any type of objects), but also with “git ls-tree” command.
The “commit” objects also store the reference to previous version (previous commit) in the history, which is very important. It enables Git to perform merges fast and well.
A bit pedantic, but “tag” objects can point to any type of object, though tags pointing to commits are most common.
Not much new here (I think I saw nearly the same description of Git history a short while ago), and there are a few factual errors in there - or at least parts that are not clear.
The “tree” objects have nothing to do with the
tree
command, and nothing to do with how repo objects are stored on the filesystem. You can display tree objects with “git cat-file -p
” (just like any type of objects), but also with “git ls-tree
” command.The “commit” objects also store the reference to previous version (previous commit) in the history, which is very important. It enables Git to perform merges fast and well.
A bit pedantic, but “tag” objects can point to any type of object, though tags pointing to commits are most common.