An introduction to Git internals
To really understand and make good use of at least some of the methods described in this chapter, you would need to understand at least the very basics of Git internals. Among others, you would need to know how Git stores the information about revisions.
One would also require to know how to manipulate such data and how to do it from a script. Git provides a set of low-level commands to use in scripts, as a supplement to the user-facing high-level commands. These commands are very flexible and powerful, though perhaps not very user-friendly. Knowledge about this scripted interface will help us also administer the Git repositories via hooks in Chapter 11, Git Administration.
Git objects
In Chapter 2, Exploring Project History, you have learned that Git represents history as the Directed Acyclic Graph (DAG) of revisions, where each revision is a graph node represented as a commit object. Each commit is identified by a SHA-1 identifier. We can use this identifier...