Problem Statement
Contrast `git rebase` and `git merge` in collaboration. Mention risks and best practices.
Explanation
`merge` combines histories and may create a merge commit; it preserves chronology from all contributors. `rebase` rewrites commits on top of a new base for a linear history—clean but dangerous if used on shared/pushed commits. Rebase private branches; avoid rebasing public history.
Practice Sets
This question appears in the following practice sets: