Challenges · Branching

Detached HEAD

0/3

Challenge

intermediate

Detached HEAD

Scenario

Yesterday you checked out an old commit to chase a rounding bug, found it, and committed a fix and a test right there. Git warned you about a "detached HEAD", but it was late.

Today HEAD still points at your work, and no branch does.

Mission

Make sure both commits survive on a branch called fix/rounding, then get back to main.

Objectives

0/3
  1. fix/rounding contains the rounding fix. (Current objective)
  2. fix/rounding contains the test too. (Not started)
  3. You are back on main. (Not started)

Your task nowStep 1 of 3

fix/rounding contains the rounding fix.

Need help?

Preparing your workspace…

Repository Graph

Click a commit to inspect it

0 commits

Working Tree

Not a Git repository yet

No unstaged changes

Your working tree matches the staging area.

Staging Area

Files prepared for the next commit

No staged changes

Use git add to prepare files for your next commit.

Repository

Committed history

No commits yet

Use git commit to record staged changes.