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

Merge versus rebase: how do you decide?

IntermediateConceptMerge, rebase and cherry-pick
Answer

Rebase to keep a linear, readable history for your own unpublished work and to update a feature branch with latest main. Merge when you want to preserve the true integration history or when a branch is shared by several people. The golden rule: never rebase commits others have based work on. Many teams combine them: rebase locally, squash-merge on the platform.

All Git & GitHub questions Roadmap: Git & GitHub

More on Merge, rebase and cherry-pick