Problem Statement
A PR has many 'merge from main' commits. Reviewers ask to clean it up. What do you do and why?
Explanation
Interactively rebase the feature branch onto the latest main and squash noisy merges into logical commits. This yields a linear, readable history while preserving meaningful changes. Avoid rewriting history only after the branch is shared publicly unless teammates agree.
Practice Sets
This question appears in the following practice sets: