Menu
Coddy logo textTech

Snapshots And Commits

Part of the Version Control section of Coddy's Terminal journey — lesson 3 of 58.

Git saves your project as a series of snapshots. Each snapshot is called a commit, and each commit captures the exact state of every tracked file at that moment.

You decide when to take a snapshot. A typical workflow looks like this:

  1. Edit some files.
  2. Tell Git which changes you want included in the next snapshot.
  3. Create a commit with a short message describing the change.

Each commit gets a unique ID (a long string of letters and numbers) and a message you write yourself, like "Add login form" or "Fix typo in README".

Once a commit is created, you can always come back to it. Even if you delete files later, the snapshot remembers what they used to look like.

Cheat sheet

Git saves your project as a series of commits (snapshots). Each commit captures the exact state of every tracked file at that moment and gets a unique ID.

Typical commit workflow:

  1. Edit some files.
  2. Tell Git which changes to include in the next snapshot.
  3. Create a commit with a short descriptive message (e.g. "Add login form").

Commits are permanent snapshots — you can always return to any previous commit.

Try it yourself

This lesson doesn't include a code challenge.

quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Version Control