commit

A saved snapshot of the whole project in Git, together with its author, committer, time, message and a pointer to the commit before it.

In more detail

A commit object holds a tree (the snapshot), one parent line per previous commit (none for the first), an author and a committer with their timestamps, and the message. Its ID is the hash of that text, so a commit can never be changed, only replaced by a new one. The chain of parent pointers is the project history.

Examples

Token pipelines and accessibility checks run on every commit pushed to the design system repository.
git cat-file -p HEAD
git commit -m "Word counter: first working version"
The course's pre-commit hook checks staged text before a commit exists.
In Terraform: In the course you commit .tf files, variable files and the dependency lock file, so every infrastructure change is recorded. A pipeline usually runs format, validate and plan on every commit. Never commit state files or secrets.
In this course: A flaky test gives different results for the same commit, which proves the problem is in the test or environment, not in the code change. Each commit records who changed what and why, so it is the unit a pipeline builds and tests.

Related terms

Taught in

References

Certification courses