An Older Commit
The commit before the latest one added rate.txt with a wrong number. The right number is in the file now, as an edit that is not committed. Put that edit into the commit that added the file. Afterwards the history has the same commits with the same messages, and nothing is left to commit.
Example 1
starts as
* 12ac301 (HEAD -> main) add notes * a73bf92 set the rate * b527f18 first commit changed, not staged: rate.txt rate.txt in the last commit: 0.52 rate.txt in the folder: 0.25
ends as
commits, newest first: add notes set the rate first commit rate.txt after each commit, newest first: add notes: 0.25 set the rate: 0.25 first commit: (not there yet) staged: nothing changed, not staged: nothing untracked: nothing
Constraints
- 3 to 5 commits
- The latest commit did not touch
rate.txt - Nobody else has these commits 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
- Both Sides MovedHard
- Commits per AuthorHard
- Find and PickHard
- Get Them BackHard
- On Top of MainHard
- Split the CommitHard
- The First Bad CommitHard
- Three Into OneHard