Take Back the Commit
The latest commit was made too early. Take it back: the branch ends one commit earlier, and what that commit changed stays in the folder, not staged.
Example 1
starts as
* 614283f (HEAD -> main) too early * 44553c0 add b * b527f18 first commit nothing to commit
ends as
on branch: main commits, newest first: add b first commit staged: nothing changed, not staged: a.txt untracked: nothing
Constraints
- 2 to 5 commits
- Nothing is edited or staged
- Nobody else has the commit yet
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Git problems
- Two Lines of WorkMedium
- Undo With a New CommitMedium
- An Older CommitHard
- Both Sides MovedHard
- Commits per AuthorHard
- Find and PickHard
- Get Them BackHard
- On Top of MainHard