3 ms·
To speculate, maybe you haven't heard of fixup/squash. E.g. Commit 1 Commit 2 Commit 3 Using an empty fixup commit, e.g. git commit --allow-empty --fixup=com
by throwaway_au_1 4y ago
To speculate, maybe you haven't heard of fixup/squash.
E.g.
Commit 1
Commit 2
Commit 3
Using an empty fixup commit, e.g.
git commit --allow-empty --fixup=commit2hash
You would end up with
Commit 1
Commit 2
Commit 3
fixup! Commit 2
Which will adjust automatically (when starting interactive rebase with autosquash) to
Commit 1
Commit 2
fixup! Commit 2
Commit 3
You could then simply change the rebase 'fixup' instruction to 'reword' to edit/remove the 'fixup!' part of the message, or 'edit' to continue the rebase uo until that commit and then stop.
That said, again, not clear on your use case but maybe that might help you or another reader.