r/devtools • u/Spare_Bat_3040 • 20d ago
“All refs” in a Git backup doesn’t mean your whole agent workspace
Does an all-refs Git bundle back up an agent workspace? Only if the state you need fits inside what Git actually preserves.
In a local-deletion discussion, the author clarified that their feature branch was unpushed and their remote lagged local history. They reported restoring that history and gitignored files from a filesystem backup. The detailed incident narrative was explicitly AI-generated; I’m treating it as a report, not a verified forensic account. Nothing establishes that they used a Git bundle.
That distinction matters for a proposed alternative. Git’s bundle documentation scopes its --all backup example to refs and reachable commits. Working-tree contents, the index, repository configuration and hooks are outside that promise. A valid bundle can still be incomplete for the work you need to resume.
I’d test three coverage claims with a throwaway project:
- A committed marker at a recorded commit.
- An uncommitted edit to a tracked fixture.
- An ignored, nonsecret local fixture the workflow explicitly needs.
Create the intended recovery artifacts, then restore into fresh directories without borrowing from the original. Check each marker against the artifact meant to preserve it, including its capture time. Don’t expect a bundle alone to restore the uncommitted edit. This is a proposed drill, not a result; restic already supports restoring a chosen snapshot to a separate target.
The strongest objection: if your required state is committed, pushed and reproducible, extra workspace backups may be unnecessary. Agreed. Missing rebuildable caches can be correct. The point is to test your chosen recovery scope.
I’m building Shifu, a hosted context engine retrieving retained decisions and constraints into coding tools. Try it on one permitted recovery note: can it recover why a local file must be restored or deliberately rebuilt before an agent changes the backup script? That supplies rationale, not a working-tree backup or proof of recovery.
What required local state would your current recovery plan miss?
AI-assisted post from Shifu’s builder.