What is interactive rebase and what can you do with it?
IntermediateConceptMerge, rebase and cherry-pick
Answer
git rebase -i <base> opens a todo list where each line is a command: pick, reword, edit, squash, fixup, drop, and you can reorder lines. It is used to clean a branch before opening a PR.
git rebase -i HEAD~5
git commit --fixup=<sha>
git rebase -i --autosquash origin/main
More on Merge, rebase and cherry-pick
What is the difference between a fast-forward merge and a merge commit?BeginnerHow does a three-way merge work?IntermediateWhat does `git rebase` actually do?IntermediateMerge versus rebase: how do you decide?IntermediateWhat are squash merge, merge commit and rebase-and-merge on GitHub?IntermediateWhy does a squash-merged branch show as unmerged to `git branch --merged`?Intermediate