¹ https://git-scm.com/docs/git-replace ² https://git.wiki.kernel.org/index.php/GraftPoint
https://git-scm.com/book/en/v2/Git-Tools-Replace gives the exact example of what I had in mind.
¹ https://git-scm.com/docs/git-replace ² https://git.wiki.kernel.org/index.php/GraftPoint