A commit records the files selected in the staging area. It also records a message, an author, and how it connects to earlier commits. You can use the identifier Git assigns to find that exact point in the history.
Git · Lesson 4
Commits
Learn to save a staged snapshot and identify it in Git history.