Ignore files in Git without adding them to .gitignore

1 shramko-dev 1 6/11/2025, 2:31:58 PM shramko.dev ↗

Comments (1)

ashwinsundar · 20h ago
Yes, .git/info/exclude is a nice trick. No, we don’t need another AI-generated article about it.

Also, that suggestion about how to avoid committing temporary changes is not great. Just run a git restore, instead of applying strange settings to your entire repo and then wasting time trying to debug whatever went wrong after forgetting that you made that change to git behavior for a single file.