Rewriting history
Many times, while working on a project, you may want to revise your commit history. One reason for this could be to make it easier to review before submitting changes upstream. Another reason would be to take reviewer comments into account in the next improved version of changes. Or perhaps you'd like to have a clear history while finding regressions using bisection, as described in Chapter 2, Exploring Project History.
One of the great things about Git is that it makes revising and rewriting history possible, while providing a wide set of tools to revise history and make it clean.
Note
There are two conflicting views among users of the version control system: one states that history is sacred and you should better show the true history of the development, warts and all, and another that states that you should clean up the new history for better readability before publishing it.
An important issue to note is that, even though we talk about rewriting history, objects in Git...