Terminal, repository, and status

Initialize in the right folder and understand untracked, modified, and staged states.

Difficulty
beginner
Time
35 minutes
Last verified
9/21/2026

What you will build

Initialize in the right folder and understand untracked, modified, and staged states.

Understand the idea first

Initialize in the right folder and understand untracked, modified, and staged states.

Build it step by step

cd my-learning-page
git init
git status
git add index.html
git status
  1. Open the previous project and record its result.
  2. Type the example and complete: Create all three states and inspect each with status.
  3. Change one input, predict, then verify.
  4. Create and repair: If git init ran in a parent folder, stop and locate the actual .git directory.

Read the important lines

  • Initialize in the right folder and understand untracked, modified, and staged states.
  • Read input, processing, and output separately.
  • Verify another input and an edge case.

Common mistakes and what to check

SymptomWhat to check
Unexpected resultIf git init ran in a parent folder, stop and locate the actual .git directory.
Nothing changesSave, verify paths, and read the first relevant Console error.

Practice without copying

Create all three states and inspect each with status.

Check the answer after you try

Rebuild and explain the decisions. Check: If git init ran in a parent folder, stop and locate the actual .git directory.

Completion check

  • I produced the required visible result
  • I can explain the input, processing, and output
  • I tested normal, edge, and failure cases

Your privacy choices

Necessary storage is always on. Optional analytics and support services load only after consent.