FunctionRacerProblemsRace

Drop the Last Two

MediumGita shell script

The last two commits were a mistake, and nobody else has them yet. Remove them for good: the branch ends two commits earlier, and the folder is as it was then.

Example 1

starts as
* c551cd0 (HEAD -> main) mistake two
* 09acb6a mistake one
* 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: nothing
untracked: nothing
files in the folder:
  a.txt
  b.txt

Constraints

Race itor take your time

Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.

More Git problems