Rewriting Git 2.x History
This course teaches you why rewriting Git history can be useful, how to do it, and how to deal with some of the common problems that can arise when you do.
What you'll learn
A good Git history allows you to clearly identify important milestones, easily revert logical blocks of related changes, and collaborate efficiently with your colleagues. However, these benefits are hard to realize if your history is poorly structured and full of distracting noise. In this course, Rewriting Git 2.x History, you'll learn how you can use interactive rebasing to rewrite your Git history, allowing you to keep it clear and concise. First, you'll learn exactly why rewriting Git history is worthwhile. Then, you'll explore what interactive rebasing is, with a series of examples. Finally, you'll see how to minimize the risk of introducing problems when you perform interactive rebases and how to revert the effects of a rebase should you need to. When you’re finished with this course, you’ll have all the skills you need to keep your Git history in good shape.
Table of contents
- Introducing Interactive Rebasing 4m
- Your First Interactive Rebase 4m
- Squashing Commits Together 2m
- Splitting Commits Apart 3m
- Reordering Commits 2m
- Dropping Commits 2m
- Using fixup Commits 2m
- Amending the Most Recent Commit 2m
- Pushing Rewritten History to a Remote 3m
- Using fixup Commits During a Pull Request 4m
- Module Summary 1m