Squashing allows you to combine multiple commits in your branch's history into a single commit. This can help keep your repository's history more readable and understandable.
You can pass in the number of previous commits you would like to squash. For Example
git rebase -i HEAD~3