# Commit

> A saved snapshot of your project, with a note saying what changed.

**Field:** Software Development  
**Category:** Version Control  
**Also known as:** Git Commit

## Think of it like

Think of it like a save point in a game. If things go wrong, you can start again from there.

## Definition

A commit is a saved snapshot of your project at one moment. It holds the staged changes, a short message, the author's name and the time. Each commit gets a unique code, like 93eadff, so you can find it later. Commits link to the one before, which makes a chain that is the project's history. A commit lives only on your computer until you push it.

## Example

Jack finishes the home page and commits it with the note Add home page. Weeks later he can still see exactly that version.

## Example code

```console
$ git commit -m "Add home page"
[main (root-commit) 93eadff] Add home page
 1 file changed, 1 insertion(+)
```

The commit gets the code 93eadff and records one changed file.

## Why it matters

Commits are the steps of a project's history. Good ones make bugs easy to trace and undo.

## Common mistake

Writing messages like stuff or fix. A month later, nobody can tell what that commit did.

## Three principles

- **A snapshot.** The project as it was, saved.
- **A clear message.** Say what changed and why.
- **Local until pushed.** Others see it only after a push.

## Related terms

- [Staging Area](https://learn.benibix.com/term/development/staging-area)
- [Git Push](https://learn.benibix.com/term/development/push)
- [Branch](https://learn.benibix.com/term/development/branch)
- [Diff](https://learn.benibix.com/term/development/diff)
- [Commit Message](https://learn.benibix.com/term/development/commit-message)
- [Commit Hash](https://learn.benibix.com/term/development/commit-hash)
- [Git Commit Amend](https://learn.benibix.com/term/development/git-commit-amend)

## Told apart from

- [Git Commit vs Git Push](https://learn.benibix.com/compare/git-commit-vs-git-push): A commit saves a change on your own computer. A push sends your commits to the shared remote, where the team can see them.
- [Claude Code Checkpoint vs Git Commit](https://learn.benibix.com/compare/claude-code-checkpoint-vs-commit): People think a Claude Code checkpoint is a git commit. It is not. A checkpoint is a save point Claude Code makes on your computer at each prompt, so you can rewind a bad edit. It is kept for about 30 days, and it misses changes made by shell commands. A commit lives in git, is shared with your team, and stays until someone removes it.

## Taught in

- [Git Add and Commit](https://learn.benibix.com/learn/development-version-control/git-add-and-commit): Git and GitHub, 2/13

---

Source: https://learn.benibix.com/term/development/commit
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
