Pcornel
Automation · Git

Merge

Cheat sheet · https://pcornel.dk/topic.php?topic=5470

Back to the Topic

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> — merge
  • git 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

BoundaryHealthy evidenceSuspicious evidence
Local stateRepository, HEAD, worktree/index and commit IDs are explicitWrong repo/ref, hidden staged/untracked state or mutable-name ambiguity
History / refsAncestry and branch/tag movement match intentUnexpected rewrite, stale tracking ref or unclear merge base
Remote syncURL/refspec, auth and remote read-back match expected commitsLocal assumptions, rejection, stale fetch or unsafe force update
Downstream proofBuild/reconciliation/target is verified independentlyPush/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

Confirmation

Confirm action

Continue?