Git How-To: Squash commits in one line

Adding this here in case I need to refer to it in the future.

git reset --soft HEAD~3 && git commit

Where ~3 means squashing last 3 commits into one.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.