BACK_TO_COURSEhttps://git-scm.com/book/en/v2/Git-Branching-Rebasing
Working With Remotes & Not Breaking Prod
Pull Requests Are a Review Tool, Not a Filing Cabinet
Small PRs Get Reviewed. Giant PRs Get Rubber-Stamped.
A pull request exists so another human can actually read and reason about a change before it hits main. A 40-file, 3,000-line PR isn't reviewable — it's just a formality someone clicks approve on without reading, which defeats the entire point of having review in the first place.
What Makes a PR Reviewable
- One logical change per PR — not "also fixed a typo, also upgraded a dependency, also refactored auth"
- A description that says why, not just what (the diff already shows what)
- Commits that tell a story, not twelve "wip" and "fix" commits — this is what interactive rebase (Module 4) is for, done before opening the PR
Force-Pushing to a Shared Branch
Cleaning up commits on your own PR branch after pushing requires a force-push. Plain git push --force can silently overwrite a teammate's commits if they pushed to the same branch in the meantime. git push --force-with-lease refuses to push if the remote has commits you haven't seen — the safe default for a shared branch.
git push --force-with-lease # yes
git push --force # only ever on a branch that's 100% yours alone
QUIZ
Why is `--force-with-lease` generally preferred over plain `--force` on a shared branch?
Sign in to track lesson progress and earn a certificate.SIGN IN TO SAVE PROGRESS