Merge
Cheat sheet · https://pcornel.dk/topic.php?topic=5470
Answer
Merge integrates histories by combining commits and, when needed, creating a merge commit whose parents preserve both lines of ancestry.
Remember
- Merge completed ≠ semantics correct; non-conflicting text can still combine behavior incorrectly.
- No conflict ≠ no risk; Git only detects certain overlapping content edits, not logical incompatibility.
- Fast-forward ≠ merge commit; ancestry can advance without creating a new merge object.
- Merge commit present ≠ remote integrated; publication is a separate push boundary.
First checks
git merge --no-ff feature/<x>— mergegit log --graph --oneline -15— history graph- PR merge strategy (merge/squash/rebase) — policy
Verify in this order
feature → PR → checks → merge
Where it usually breaks
Git reporting a clean merge proves it produced a tree according to merge mechanics; it does not prove semantic compatibility, tests or deployment.
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Merge Git boundary map
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Local state | Repository, HEAD, worktree/index and commit IDs are explicit | Wrong repo/ref, hidden staged/untracked state or mutable-name ambiguity |
| History / refs | Ancestry and branch/tag movement match intent | Unexpected rewrite, stale tracking ref or unclear merge base |
| Remote sync | URL/refspec, auth and remote read-back match expected commits | Local assumptions, rejection, stale fetch or unsafe force update |
| Downstream proof | Build/reconciliation/target is verified independently | Push/tag/merge success treated as deployment success |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5470