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 the 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 4, 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.
Views on rewriting history
There are two conflicting views among users of the version control system. One states that history is sacred and that you should show the true history of the development, warts, and all. The other 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...