Hands-on task
Add a line to an old commit with rebase edit
In /root/repo there are three commits. The middle one (add config) created the file config.ini, but the line timeout=30 was forgotten in it. Add this line to that very commit — as if it was never forgotten: config.ini in that commit must contain timeout=30, the number of commits must stay the same (three), and the third commit (add readme) must come after the fixed one, as before.
- git rebase -i
- editing a commit
- git commit --amend
- rebase --continue
- rewriting history