Interactive rebase last N commits git
Squash, reorder, or edit the last 5 commits
git rebase -i HEAD~5
more git
all 45 commands →
Cherry-pick commit
git cherry-pick <sha>
Reflog — rescue lost commits
git reflog show --date=relative | head -20
Stash with message
git stash push -m 'WIP: feature-x' -u
Apply stash by index
git stash pop stash@{2}
Bisect — find broken commit
git bisect start && git bisect bad HEAD && git bisect good <good-sha>