Pcornel
Automation · Git

Pull

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

Back to the Topic

Answer

Git pull combines fetching remote updates with a configured integration step such as merge or rebase, so it changes both local knowledge and potentially local branch history.

Remember

  • Pull success ≠ local state unchanged; it may fast-forward, merge or rebase the current branch.
  • Fetch success ≠ integration success; objects can transfer correctly while merge/rebase fails.
  • No new commits ≠ remote unreachable; the remote may simply have no change.
  • Pull on wrong branch ≠ synchronization of intended branch; upstream is branch-specific.

First checks

  • git pull --ff-only — safe pull
  • git fetch && git status — compare
  • pull.rebase config — behaviour

Verify in this order

remote changes → fetch → integrate

Where it usually breaks

A successful pull proves fetch plus configured local integration succeeded; it does not prove project tests, remote publication or downstream deployment.

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Pull 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=5474

Confirmation

Confirm action

Continue?