Split the Commit
The latest commit changed parser.py and readme.md, two things that do not belong together. Replace it with two commits: first one that changes only parser.py, with the message fix the parser, then one that changes only readme.md, with the message update the readme.
Example 1
starts as
* 0f8b0d2 (HEAD -> main) fix the parser and the readme * 4e10365 write the readme * a7e8b6e add the parser nothing to commit
ends as
commits, newest first, with the files each one changed: update the readme: readme.md fix the parser: parser.py write the readme: readme.md add the parser: parser.py staged: nothing changed, not staged: nothing untracked: nothing
Constraints
- 2 to 4 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
- The First Bad CommitHard
- Three Into OneHard
- Undo the MergeHard
- When Was It AddedHard
- A New BranchBeginner
- Back to MainBeginner
- Commit the ChangeBeginner
- Commit the New FileBeginner