Remote
Cheat sheet · https://pcornel.dk/topic.php?topic=5473
Answer
A Git remote is a local name and set of URLs/refspecs describing another repository; configuring it does not establish reachability, authorization or synchronization.
Remember
- Remote configured ≠ reachable or authorized; URL presence is only local configuration.
- Remote-tracking ref ≠ live remote state; it changes when fetch updates local knowledge.
- Fetch URL ≠ push URL necessarily; a remote can use different endpoints or permissions.
- Remote name ≠ repository identity; aliases such as origin are conventions and can point anywhere.
First checks
git remote -v— remotesgit fetch --prune— update refsgit remote set-url origin <url>— change URL
Verify in this order
local ↔ remote
Where it usually breaks
A configured remote proves only that local Git metadata contains an endpoint mapping; it does not prove endpoint identity, access or current remote ref state.
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Remote 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=5473