Design docs dissolving after git rebase, a git worktree branch shielding them safely

Git Rebase Ate My Docs — Save Them with Worktree

TL;DR: git rebase / checkout silently deletes untracked files in .gitignore, with no recovery; git stash -u does NOT stash git-ignored files. The fix: use git worktree to create a local-assets branch, storing design docs in a git-tracked safe space. Three commands handle daily use: dp-save.sh to save, --prune to clean, --restore to recover. Real project data shows zero document loss after introducing worktree. Full script at alexwwang/design-doc-worktree. One afternoon I had AI run git rebase -i to tidy up the last dozen commits. No conflicts. Clean terminal. Everything went smoothly. ...

2026-05-08 · 10 min · Alex Wang