The tools nobody teaches

Pro lesson All levels

Commits, history and time travel

Read what changed, commit only what is ready, visit old versions, and undo mistakes without panic.

14 min8 hands-on steps

In this lesson you will

  • Read git status and git diff
  • Commit some changes and not others
  • Look at old versions and bring one back

Words you'll meet

Working tree
The files as they are on disk right now.
Staging area
What will go into the next commit.
HEAD
Git's 'you are here' marker: the commit you are looking at.

The steps

Each step teaches one idea, then has you try it hands-on in your browser, and checks your work.

  1. 1Read the status
  2. 2See exactly what changed
  3. 3Commit only what is ready
  4. 4Read the history
  5. 5The short code
  6. 6Throw a change away
  7. 7Visit the past
  8. 8Challenge

This lesson is part of LearnDE Pro

$12 a month or $100 a year: every lesson, spaced-repetition flashcards, and Learn by teaching. Refund on request within 14 days.