Interview Prep/Git & GitHub/Merge, rebase and cherry-pick

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
All Git & GitHub questions Roadmap: Git & GitHub

More on Merge, rebase and cherry-pick