Squash git commits

Table of Contents

1. Squash commits in Git with Interactive rebase

In this process, we will grab all the commits with the git rebase command with the i flag and put them together with squash.

We need to tell Git how far back we want to rebase. For example, we need to go back 6 commits.

git rebase -i HEAD~6