← Back to Catalog
💻Code4 min

Git Branch vs. Commit

Branches and commits are both fundamental to git — but they're not the same thing. Here's the difference.

Beat 1 of 5

A commit: a snapshot

A commit is a snapshot of your code at a specific moment. It has a unique hash, a message, and points to its parent commit(s). Commits are permanent records.