Merge vs rebase in one line each?

IntermediateConceptGit
Answer

Merge keeps history as it happened and adds a merge commit. Rebase replays your commits on top of the target for a linear history but rewrites commit SHAs, so never rebase shared branches.

All Real-World Interview questions Roadmap: Interview readiness

More on Git