Clone
Cheat sheet · https://pcornel.dk/topic.php?topic=5467
Answer
Clone creates a new local repository from another repository and initializes remote-tracking context, but it does not automatically reproduce every dependency or runtime prerequisite of the project.
Remember
- Clone complete ≠ working automation environment; dependencies, secrets, submodules and generated state may still be absent.
- Repository copied ≠ all history copied; shallow, filtered or single-branch clones intentionally omit objects or refs.
- Checkout created ≠ desired branch current; remote refs may move after clone.
- Authentication succeeded ≠ source trusted; repository provenance must be established separately.
First checks
git clone <url>— clonegit clone --depth 1 <url>— shallow (CI)git clone --recurse-submodules <url>— with submodules
Verify in this order
remote → clone → local repo
Where it usually breaks
A successful clone proves that Git transferred enough repository data to create the requested local state; it does not prove a complete runtime or automation environment.
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Clone 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=5467