Files
curriculum/1.solar-system/1.welcome/12.the-initiator/index.md

1.0 KiB

type, title, xp, duration, difficulty
type title xp duration difficulty
challenge The Initiator 50 20 2

The Initiator

[INCOMING — Mission Control, Earth]

Cadet, ground zero. Take an empty directory and turn it into a Git project.

Two commands today:

  • git init — turns the current directory into a Git repository (creates a hidden .git/ folder)
  • git status — shows what Git sees: branch, tracked, untracked

Your script must:

  1. Run git init (use -b main to set the default branch)
  2. Capture git status to status-before.txt
  3. Create intro.md containing Hello, Git
  4. Capture git status to status-after.txt

Notice the second status sees the new file as untracked — that distinction is the heart of how Git works.

[END TRANSMISSION]

Your Task

In starter/starter.sh, write the four steps above.

Objectives

  • .git/ exists
  • intro.md contains Hello, Git
  • status-before.txt looks like git status output
  • status-after.txt mentions intro.md