Commits

Learn what a Git commit is and how commits create a clear and reliable history of your project.

What is a commit?

A commit is a snapshot of your project at a specific moment in time.

It records:

  • The staged changes

  • A message describing what changed

  • A unique identifier (hash)

Commits allow you to:

  • Track progress over time

  • Understand why changes were made

  • Revert to earlier versions safely

How commits fit in the workflow

  • Edit files

  • Stage selected changes

  • Create a commit

circle-info

Only staged changes are included in a commit.

Creating a commit (example)

Writing good commit messages

  • Short and clear

  • Describes what changed, not how

  • Written in present tense

triangle-exclamation
circle-check

Full more information about commit message check here →

circle-exclamation
Drawing

Last updated

Was this helpful?