Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: