How do you verify your first Crab push?
Five visible checks prove that one tracked file reached the remote and came back byte-for-byte.
A progress bar only proves that Crab did some work. A verified push needs five visible results: Git stores a pointer, Crab publishes the branch, a fresh clone finds that pointer, hydration rebuilds the file, and the rebuilt bytes match the original.
State after a successful push
Scroll horizontally to explore the full diagram →
1. Start from a clean test branch
Use a configured repository and keep this first test away from a shared production branch.
git status --short
crab doctor
export CRAB_VERIFY_REMOTE="$(git remote get-url origin)"
git switch -c verify-crab-pushIf git status --short prints anything, commit or stash it first. Fix any crab doctor failure before creating test data.
The CRAB_VERIFY_REMOTE variable keeps the same remote URL for the fresh-clone check later. Run the tutorial in one shell so the variable remains available.
2. Create one file with a known hash
This sample is deliberately simple. It proves the storage path, not real-world deduplication performance.
mkdir -p models
dd if=/dev/zero of=models/checkpoint.bin bs=1048576 count=64
git hash-object models/checkpoint.bin > ../checkpoint.git-hashgit hash-object gives the file a repeatable content ID using Git's own hashing tool. Saving it outside the repository prevents the evidence file from entering the test commit.
Now route .bin files through Crab:
crab track '*.bin'
git add .gitattributes
git check-attr filter -- models/checkpoint.binThe last command should report filter: crab. If it does not, stop here and fix the tracking rule.
3. Stage the file and inspect Git's copy
crab add models/checkpoint.bin
git show :models/checkpoint.binThe output should be a short text pointer with a version, file-hash, and size. Your working-tree file remains 64 MiB; only Git's staged representation is small.
If git show emits binary data, do not commit it. The file missed the Crab filter.
| Surface | What should exist now |
|---|---|
| Worktree | Complete 64 MiB file |
| Git index | Compact Crab pointer |
| Local Crab staging | Chunks and the reconstruction recipe |
| Remote | Nothing from this new commit yet |
4. Commit and publish
git commit -m "Verify first Crab push"
crab pushStep through the trace below. Crab uploads immutable Git and large-file data, verifies that the pointer can be reconstructed, and only then advances the branch.
TRANSACTION TRACE 03
Push makes dependencies durable, then moves the ref
Discover the complete push closure
The helper walks reachable Git objects and parses Crab pointers before opening any large-file metadata path.
Check the two commit IDs:
git rev-parse HEAD
git ls-remote origin refs/heads/verify-crab-pushThe hashes should match. That proves the remote branch names your commit—but not yet that another client can reconstruct the file.
Run the repository checks:
crab status
crab fsckcrab status checks the tracked file's local state. crab fsck checks pointer, metadata, chunk, and remote-object relationships.
5. Prove it from a fresh clone
Leave the writer repository. Clone the test branch lazily so the new worktree starts with the pointer:
cd ..
crab clone --branch verify-crab-push "$CRAB_VERIFY_REMOTE" vision-search-verify
cd vision-search-verify
crab statuscrab status should mark models/checkpoint.bin as a pointer. Materialize only that file:
crab hydrate models/checkpoint.bin
test "$(git hash-object models/checkpoint.bin)" = "$(cat ../checkpoint.git-hash)" \
&& echo "hash matches"The final line should print hash matches. That is the end-to-end proof: the reader reconstructed the same bytes without the writer's staging directory.
Hydration is a proof pipeline
Scroll horizontally to explore the full diagram →
For stronger evidence, repeat the clone in a clean container, runner, or another machine. A second directory on the writer's machine may still share credentials or an optional cache.
When a check fails
| Failure | Next action |
|---|---|
git check-attr does not report Crab | Run crab track '*.bin', inspect .gitattributes, then check the path again |
| The staged Git object is the full binary | Stop before committing; rerun crab doctor and restage after fixing the filter |
crab push reports credentials or storage access | Fix the boundary reported by crab doctor, then rerun crab push |
| The local and remote commit IDs differ | Fetch and reconcile the branch; do not force past a stale ref |
| Hydration fails or the hash differs | Run crab fsck; the repository is not verified |
A failed upload may leave complete immutable objects that a retry can reuse. It must not advance the ref to a state with missing reachable data.
Keep five pieces of evidence
- Git attributes route checkpoint.bin through the Crab filter.
- The staged Git object is a compact pointer.
- The remote branch points to the new commit.
- A fresh clone can hydrate checkpoint.bin.
- The hydrated file has the original Git content hash.
Once all five pass, the repository has crossed the complete write-and-read path. Continue with How does Crab connect to Git? to see which Git protocols produced each result.
KNOWLEDGE PROOF
Check the decision, not your memory.
Which result is the strongest end-to-end proof of a first Crab push?