Skip to content
Back to library
beginnerGit Fundamentals

Commit

The Definition

A commit is a snapshot of your project at a specific point in time, stored as an object in Git's database.

Mental Model

"A commit is like a saved state in a video game. It records exactly what your project looked like at that moment, so you can return to it later."

Visual Simulation

Live Engine

Watch Out (Common Pitfalls)

!

Writing poor commit messages like "update" or "fix"

!

Making commits that are too large or cover multiple unrelated changes

!

Not committing frequently enough

Hands-on Command

shell
~ $git commit -m "Add user authentication feature"