How to Squash Commits in Git
Very often we will be committing smaller pieces of work in our local machine as we go. However before we push them to a centralized repository, we may have to combine these small commits to single large commit, which makes sense for rest of the team. I will explain how this can be achieved by using interactive rebasing. To start with, let us assume the initial commits history look like below. It have 4 minor commits done to the same file. ...