Drop the Last Two
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
- 3 to 6 commits
- Nothing is edited or staged
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Git problems
- Get the New WorkMedium
- Move the EditsMedium
- Off the Wrong BranchMedium
- Only on the BranchMedium
- Pick the LatestMedium
- Publish the BranchMedium
- Settle the ConflictMedium
- Since the ReleaseMedium