3 ms·
Or simply: git add ... git commit --fixup $SHA git rebase -i --autosquash --autostash $SHA~
by johnkeeping 11y ago
Or simply:
git add ...
git commit --fixup $SHA
git rebase -i --autosquash --autostash $SHA~
- koreno 11y agoIt 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.
- johnkeeping 11y agoThat'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.