Summary
This chapter, along with Chapter 6, Advanced Branching Techniques, provided all the tools required to manage a clean, readable, and easy-to-review history of a project.
You have learned how to make history more clean by rewriting it, and what does rewriting history mean in Git, when and why to avoid it, and how to recover from an untimely upstream rewrite. You have learned to use an interactive rebase to delete, reorder, squash, and split commits, and how to test each commit during rebase. You know how to do large-scale scripted rewrite with filter-branch: how to edit commits and commit metadata and how to permanently change history, for example, splitting it in two. You also got to know some third-party external tools, which can help with these tasks.
You learned what to do if you cannot rewrite history: how to fix mistakes by creating commits with appropriate changes (for example with git revert
), how to add extra information to the existing commits with notes, and how to change...