Squash and Rebase — Git Basics
Let’s say you’re working on a project with 2 other developers. You’re each being good citizens and checking in your code to feature branches. Then, when the time is right, those branches will be checked into the main branch. All good.
However, fast forward a few months and your git history will likely end up looking something like this! Yikes.