All challenges

Git · medium

Soft landing, wrong branch

#12

Situation

The promo banner was committed on release by mistake. It belongs on feature/promo-banner, which still points to the base that release had before the slip. The work is good; only the branch tip is in the wrong place.

Objective

Put the banner commit on feature/promo-banner, then leave release at one commit. Finish on the feature branch with a clean working tree.

The repo at start

repo/
└── src/
    └── banner.ts   (committed on release by mistake)

Checks you will turn green

  • HEAD is feature/promo-banner with the banner committed
  • The banner file is the promo work, clean
  • release went back to one commit
  • Nothing staged

Concepts

resetsoft resetbranchescommit

Play it in your terminal

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

sharpen 12

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 12
  4. or Or try it without installing anything:
    npx @juanwmedia/sharpen 12
  5. 4 And to update when a new version ships:
    sharpen update