Epistemic Status: Sprouting - This is a zettelkasten-style card about a concept I’m interested in remembering.
In Git, you can run git commit --fixup=<commit-hash>
to make a new commit to amend a past commit, even one several commits back, and then run git rebase --autosquash
to have Git amend the commit and rewrite the rest of the history.
I use this sometimes when I stage multiple commits by adding chunks in Magit and fixing things when I realized I missed a piece that should have gone into a previous commit that I can’t just amend.