Aung Si Min Htet

layer - Keep local repo files out of git without changing .gitignore

layer is a CLI for managing local-only files in a git repo without polluting the shared gitignore. It uses git/info/exclude to hide personal files like notes, prompts, specs, and scratch docs from git status, while keeping them on disk. It also supports quick hide/unhide with layer off / layer on, and keeps private local snapshot history for hidden files so you can diff or recover changes later.

Add a comment

Replies

Best
Aung Si Min Htet
I built layer from a pretty simple repo problem. In team repos, people often keep their own local files around for work — notes, prompts, specs, scratch docs, temporary investigation files, and other markdown files with custom names. These files are useful, but they usually should stay local and not go into the shared .gitignore. Git already has .git/info/exclude for this, but I wanted a simpler workflow around it. I also added layer off / layer on because sometimes hidden files stop showing up naturally in repo navigation or file suggestions, and I wanted an easy way to temporarily show them again. The other part I wanted to solve was history. Once those files are hidden from Git, normal Git history is not very helpful for diff or recovery, so layer also keeps a private local snapshot history for them. Happy to answer anything, and also curious how other people handle this today.