Three Into One
The last three commits are small steps of one piece of work. Replace them with a single commit that makes the same changes, with the message add the report. The commits before them stay.
Example 1
starts as
* 3d57a8f (HEAD -> main) add a chart * 60e3b5d more report * 84a3b36 start the report * b527f18 first commit nothing to commit
ends as
commits, newest first: add the report first commit files changed by the latest commit: chart.txt report.md staged: nothing changed, not staged: nothing untracked: nothing a.txt: 1 chart.txt: c report.md: r s
Constraints
- 4 to 7 commits
- Nothing is edited or staged
- Nobody else has the three 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
- Undo the MergeHard
- When Was It AddedHard
- A New BranchBeginner
- Back to MainBeginner
- Commit the ChangeBeginner
- Commit the New FileBeginner
- How Many CommitsBeginner
- Stage One FileBeginner