brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: put personal project notes in CLAUDE.local.md and gitignore it

Git
~/tips/tip-claude-md-local-file

echo "CLAUDE.local.md" >> .gitignore

Keeps your own project notes for Claude Code out of the shared CLAUDE.md and out of git.

Team instructions belong in CLAUDE.md. Your sandbox URL and your odd habits do not.

Create a CLAUDE.local.md at the project root. It loads alongside CLAUDE.md and is treated the same way, but it is yours. Add it to .gitignore so it never gets committed.

echo "CLAUDE.local.md" >> .gitignore

Example: a test-data account, the local URL you always use, or a note that you want terse answers. Within a directory, the local file is appended after CLAUDE.md, so it is read last.

It keeps the shared file clean. Colleagues do not need to read about your preferred test account, and you do not need to fight over wording in a pull request just to get Claude to behave the way you like.

The caveat is worktrees. A gitignored file exists only in the worktree where you made it, so a second worktree does not see it. For that case the docs suggest importing a file from your home directory with @~/... instead. And running /memory is a quick way to open and edit the files Claude actually loaded.

Further reading: How Claude remembers your project – Claude Code docs, Commands – Claude Code docs, On this site: scope instructions with paths in .claude/rules, On this site: @-import files in CLAUDE.md instead of pasting them

More Git tips git show-branch main feature git log --stat -5 git merge --no-ff feature -m "Merge feature" git merge --squash feature git merge --abort All Git tips (144) All topics

Link