Back to Glossary

Commit

The Quick Version

A saved checkpoint of your project.

How it actually works

A commit permanently records the state of the files you staged, along with a message and a timestamp. Commits form a chain you can inspect, compare and roll back to.

Why does it matter?

Commits are the reason a bad afternoon of edits can be thrown away in one command.

Example

git commit -m "Add contact form validation"