Pull Requests and Forges

Note

Draft placeholder — outline notes only; prose not yet written.

Points this section needs to cover (forge-neutral):

  • The fork → branch → pull request → review → merge loop

  • Opening a PR, iterating on review feedback, updating the PR branch

  • Merge strategies on forges: merge commit, squash, rebase

  • The gh CLI for creating and managing PRs from the terminal

  • How this relates to the branching workflows in Ch 3, Git Branching (GitHub Flow, trunk-based, stacked)

Keeping a fork in sync — fetching from the upstream repository while pushing to your fork (triangular workflows):

  • upstream/origin remote setup, remote.pushDefault, branch.<name>.pushRemote

Pull request refs (refs/pull/*):

  • how forges advertise PR heads as refs; fetching a specific PR by ref; inspecting raw references with ls-remote

PR notifications and patch-formatted changes: