Hacker News new | ask | show | jobs
by BigTuna 4335 days ago
If you're using a rebase workflow this is much easier than interactively rebasing when you just want to squash the last N commits:

git reset --soft HEAD~N

This rolls back the history and places all the changes in those commits into staging. Commit with a new final message and off you go.