Interview Prep/Git & GitHub/Branch protection, rulesets, CODEOWNERS and review at scale

What are the pros and cons of requiring a linear history?

IntermediateProductionBranch protection, rulesets, CODEOWNERS and review at scale
Answer

Pros: simple git log, easy bisect and straightforward reverts. Cons: it forbids merge commits, so release branches that merge forward must use rebase or squash and cherry-pick, and rebased histories lose the true merge context. It pairs naturally with squash-only repos.

All Git & GitHub questions Roadmap: Git & GitHub

More on Branch protection, rulesets, CODEOWNERS and review at scale