← ClaudeAtlas

git-recoverylisted

Recovering uncommitted work in the live ClankerMux checkout, and the worktree recipes for reading or checking out another branch. Read this if the main checkout is on an unexpected branch, if WIP appears missing, or when you need to inspect another branch without moving HEAD.
d4rken/clankermux · ★ 7 · Code & Development · score 78
Install: claude install-skill d4rken/clankermux
# Git recovery and worktree recipes The live checkout at `/home/darken/clankermux` is the systemd deployment — whatever branch and working-tree state exists at the next service start is what gets deployed. The forbidden-command list lives in `CLAUDE.md`; this file covers what to do instead, and what to do when it's already gone wrong. ## If the main checkout is on the wrong branch with missing WIP **STOP. Do not run any git commands. Tell the user immediately.** Their uncommitted work may still be recoverable, but a wrong move erases it. Possible recovery locations the **user** (not you) should check: 1. **Reflog**: `git reflog` shows the previous HEAD. If a `checkout: moving from <old> to <new>` entry exists, `git checkout <old>` may restore the prior state — but only if the working tree wasn't touched after. Confirm with `git stash list` and look at the working tree first. 2. **Untracked files**: a `git checkout` between two branches that don't conflict on untracked files leaves untracked files in place. They may still be there: `git status --porcelain | grep '^??'`. 3. **Stash**: `git stash list`, `git stash show -p stash@{0}` — in case someone stashed before switching. 4. **Filesystem timestamps**: `find . -name '*.tsx' -newer <reference-file>` can locate edits that weren't committed. After the user has assessed the state and decided on a recovery path, only then run git commands — and only the ones the user explicitly approves. ## Past inciden