All challenges

Git · easy

Staged but invisible

#5

Situation

git diff looks empty, but you know you changed something. The auth fix and a private scratch file are both staged; plain git diff compares the working tree with the index, so it hides work that is already staged. git diff --staged shows the next commit. Only the auth fix belongs there.

Objective

Keep only the auth fix staged. notes.local must remain on disk, untracked, and you must not create a commit yet.

The repo at start

repo/
├── src/
│   └── auth.ts   (staged fix - keep)
└── notes.local   (staged by mistake - unstage)

Checks you will turn green

  • Auth fix stays staged
  • notes.local is untracked on disk
  • History untouched on main

Concepts

diffstagingindex

Play it in your terminal

With sharpen installed, this command opens exactly this challenge in your local arena:

sharpen 5

First time? The full install is right below.

How to play

  1. 1 Install Claude Code if you do not have it yet: claude.com/claude-code
  2. 2 Install sharpen from npm:
    npm install -g @juanwmedia/sharpen
  3. 3 Then launch it; the arena opens in your browser:
    sharpen 5
  4. or Or try it without installing anything:
    npx @juanwmedia/sharpen 5
  5. 4 And to update when a new version ships:
    sharpen update