4 ms·
git reset <parent> —soft; git commit -m squash The first command sets your current comment to parent, with any changes staged, the second commits it. I don’t
by a_t48 5y ago
git reset <parent> —soft; git commit -m squash
The first command sets your current comment to parent, with any changes staged, the second commits it.
I don’t mess with the interactive rebase. There’s a magic combination of this and the reflog that can preserve commit history, too.