File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,40 @@ gh pr create --base main --title "..." --body "..."
3434| `fix/` | Bug fixes |
3535| `chore/` | Docs, deps, config, refactoring |
3636
37+ ## Conflict Resolution: Rebase-Only
38+
39+ When a branch falls behind `main`, **always rebase — never merge**:
40+
41+ ```bash
42+ # ❌ Never do this — creates a merge commit that breaks GitHub's rebase button
43+ git merge origin/main
44+
45+ # ✅ Always do this
46+ git fetch origin
47+ git rebase origin/main
48+ ```
49+
50+ After rebasing, force-push the branch:
51+
52+ ```bash
53+ git push --force-with-lease origin <branch>
54+ ```
55+
56+ (`--force-with-lease` aborts safely if someone else pushed to the branch in the meantime.)
57+
58+ ## Force Push Policy
59+
60+ | Branch | Force push? |
61+ | --- | --- |
62+ | `main` | ❌ Never |
63+ | Feature branch, after rebase | ✅ Use `--force-with-lease` |
64+
65+ ## PR Merge Strategy
66+
67+ Always use **"Rebase and merge"** on GitHub. Never "Create a merge commit".
68+
3769## Why
3870
3971CI deploys on push to `main`. Unreviewed changes go straight to production.
4072PRs give a chance to catch issues before they affect the daily briefing.
73+ Linear history makes `git log` readable and bisecting easy.
You can’t perform that action at this time.
0 commit comments