See commit 6ad6d3d36c5924c8ff502ebbb6a6216df01e7efb in git.git for an update to the README
file about these four commands.
+--------------+ update-cache +--------------+ write-tree +-----------+
| | ---------------> | | ------------> | |
| working copy | | staging area | | object db |
| | <--------------- | | <------------ | |
+--------------+ checkout-cache +--------------+ read-tree +-----------+
(update-cache
and checkout-cache
were later renamed to *-index
.)
In some sense, three of these are exposed through porcelain commands:
plumbing porcelain
======== =========
update-cache add, rm
write-tree commit
checkout-cache checkout
read-tree reset
Though that's not 100% accurate, because after doing write-tree
, commit
also does commit-tree
, thus creating the commit object itself, replete with parents and commit comment and whatnot.
Note also that both commit
and reset
also update HEAD
.