Rewriting history
Lessons in this group, roughly in build order:
- amending-commits-git-commit-amend — git commit —amend replaces the most recent commit with a new one, letting you fix its message or contents…
- rebasing-git-rebase — git rebase replays the commits of your branch on top of a new base, producing a linear history instead of…
- interactive-rebase-squash-fixup-reword-drop — git rebase -i opens an editable to-do list of commits so you can reorder, combine, reword, or delete them…
- cherry-picking-git-cherry-pick — git cherry-pick
copies the changes from one or more specific commits and re-applies them as new… - reverting-commits-git-revert — git revert
creates a new commit that applies the inverse of a given commit, undoing its changes… - resetting-git-reset-soft-mixed-hard — git reset moves the current branch pointer to another commit and, depending on the mode, optionally…
- reflog-and-recovery-git-reflog — git reflog is a local journal of everywhere HEAD (and each branch) has pointed, making “lost” commits from…