How do you cleanly update a PR branch after reviews without destroying review context?
AdvancedConceptBranching strategies, pull requests and code review
Answer
<details> <summary><b>Answer</b></summary>
Prefer adding new commits (or fixup commits) while the review is active, then squash at merge. If you must rebase, use --force-with-lease, mention it in the PR, and use git range-diff so reviewers can see only what changed. GitHub's "Update branch" button merges or rebases the base into the PR branch.
More on Branching strategies, pull requests and code review
What is a feature-branch workflow?BeginnerWhat is GitFlow and what are its branches?IntermediateWhat is trunk-based development and what does it require?IntermediateWhat is GitHub Flow and how does it differ from GitFlow?BeginnerWhat is release-branch strategy with cherry-picked fixes?IntermediateWhat makes a good pull request?Beginner