While I’m not a programmer per se, I do use git almost daily and
find it a great tool for source control and versioning of plain text
files. But I don’t think there can be any doubt that it is not the
easiest tool to use. But despite its
unintuitive user interface, under the hood git is quite simple and
elegant. I believe that if you can understand the fundamental
constructs git uses to store, track, and manage files, then the
using git becomes a lot easier.
In this article we’re going to take a look under the covers and
investigate git’s fundamental constructs. We’ll start off with its
storage model and look at blobs, trees and commits. We’ll see how
branches are implemented, and finally we’ll unpack the git index
file to understand what happens during the staging of a commit.