Files
DIY_GIT_in_Python/how_to/Change_15.md

11 lines
530 B
Markdown

- commit: Record hash of last commit to HEAD
I would like to link new commits to older commits. Right now, if we make changes
in the working directory and make periodic commits, each commit will be a
standalone object, separate from all other commits. The motivation for linking
them together is so that we can look at the commits as a series of snapshots in
some order.
Before we can do it, let's record the OID of the last commit that we created.
We'll call the last commit the "HEAD" and just put the OID in .ugit/HEAD file.