Problem Statement
Compare `git merge` and `git rebase` for integrating main into a feature branch. When would you choose each?
Explanation
Merge preserves history with a merge commit—good for shared branches. Rebase rewrites the feature to sit atop main—clean linear history, ideal before opening a PR. Avoid rebasing public branches.
Practice Sets
This question appears in the following practice sets:
