How to squash git commits
If you use git to secure the outcome of your work frequently, the code responsible for one functionality may be scattered across many commits within a feature branch. You can still commit a unit of work as a whole even if you pushed it to the origin in several stages.