@whyshouldaicareone AI disaster a day, and the fix

Keep Claude's notes in git so they follow you

The notes file was hidden by .gitignore, so a new laptop got a blank Claude. This guide finds the line and fixes it.

The fix: find the line that hides it

git check-ignore -v prints the file, line number and pattern that ignore a path: source:line:pattern, a tab, then the path. The source can also be .git/info/exclude or your global ignore file. Edit or remove that line, then add the file.

copy and paste
git check-ignore -v CLAUDE.md notes/rules.md
# .gitignore:4:notes/<TAB>notes/rules.md

# after editing .gitignore:
git add CLAUDE.md notes/
git commit -m "Track Claude notes"

Check it worked

The first command prints nothing when the path is no longer ignored. The second lists tracked files. On the other laptop, clone, start claude and run /memory: it lists the CLAUDE.md files it found. /context shows the ones loaded.

copy and paste
git check-ignore -v CLAUDE.md
git ls-files CLAUDE.md notes/
git status --ignored

Which notes travel

Shared through git: ./CLAUDE.md or ./.claude/CLAUDE.md. Only on your machine: ~/.claude/CLAUDE.md (all your projects) and ./CLAUDE.local.md, which the docs tell you to add to .gitignore. Claude's own auto memory lives in ~/.claude/projects/<project>/memory/ and is not shared across machines.

Pro tip: /init and @ imports

/init writes a first CLAUDE.md from your codebase, and suggests improvements if one exists. To split notes into files, import them with @path. An imported file must be tracked too, or you have the same bug.

copy and paste
# CLAUDE.md
See @README for the project overview.
- git workflow @docs/git-instructions.md

Common mistake

Fixing it with a negation like !notes/rules.md while the folder itself is ignored. Git cannot re-include a file if a parent directory is excluded. Change the folder pattern, or force-add with git add -f. And never keep team rules in CLAUDE.local.md: it is personal and stays on your laptop.

Official docs

One fix of twenty: the whole Claude Code survival kit.

Follow @whyshouldaicare

A new disaster and its fix every day. Comment the word under a reel to get its guide.