Skip to main content
Kill -9 Club
Sign in

commit

Databases

A complete snapshot of every tracked file at one moment, together with its parent commit, its author, its date and its message — all of it identified by a hash computed over exactly those things. Almost everyone describes a commit as the changes they made, because that is what Git shows: git show --stat 8f3c1d2 reports 24 insertions(+), a difference it works out on demand by comparing two snapshots. None of that difference is stored. It is why restoring an old state is instant, and why an rm secrets.env followed by a commit removes the file from the next snapshot and from none of the earlier ones. A password committed once stays readable in every snapshot that held it, on every clone anybody has already made: rotate the secret, deleting it fixes nothing.

Also written: revision

commit — definition | Kill -9 Club