News for hackers. Stuff that matters.
Re:Show HN: 'git inject' – amend commits other than HEAD by johnkeeping on Friday June 12, 2015 @10:49AM (#9706209)
Or simply:

    git add ...
    git commit --fixup $SHA
    git rebase -i --autosquash --autostash $SHA~
Re:Show HN: 'git inject' – amend commits other than HEAD by koreno on Friday June 12, 2015 @11:20AM (#9706397)
It gets more complicated if you have some other modified content that you wanna leave untouched. You then need to stash it or commit it separately.

The point of the alias is to make it all more user-friendly and less error-prone.

Re:Show HN: 'git inject' – amend commits other than HEAD by johnkeeping on Friday June 12, 2015 @11:39AM (#9706540)
That's what the `--autostash` is for. It also has the advantage that the stash will be restored at the end of the rebase even if it hits problems and needs to be continued or aborted.