commit
Also called: commits
One saved step in a project's history: a snapshot of the files with an author, a date, a message and a unique id (hash). GitHub shows it as the changes against the previous commit.
A commit is like a saved version with a note attached: a snapshot of the whole project at one moment. Git stores it efficiently (unchanged files are not duplicated), and GitHub displays it as a diff, the lines that changed since the previous commit. Each commit points to its parent, so commits form a chain: the history. On GitHub a commit page shows the message, the author, the time, the short hash (such as 3f9a2c1) and the diff.
Example
Dmytro's commit a41c09e "Raise delivery price to 59 UAH" changes one line in config/prices.json.
Common mistakes
Thinking a commit is published to users. A commit is only saved in the repository; whether it reaches the live site depends on the branch and the release process.
Learn it in the course
- Repository and commits: reading a repo page · A GitHub repository page from top to bottom, what a single commit page tells you, and what makes a good commit message.
- Reading history: messages, diffs and blame · How to open a file's history, read a diff line by line and use blame to trace any line back to its commit, pull request and issue.
- Why teams keep history: version control without fear · What version control is, how Git differs from GitHub, and why looking around a repository can't break anything.