Git exclude, a handy feature you might not know about

2 vinhnx 1 9/4/2025, 2:11:31 PM marijkeluttekes.dev ↗

Comments (1)

zahlman · 17h ago
>Exclude is particularly handy when you want to keep personal, non-standard files in a repository that is not yours, and where you cannot update its ignore files willy-nilly.

I've used it for this purpose before, but eventually I went back to just keeping a specific folder for those files, which contains its own .gitignore that excludes everything. (Note that Git doesn't track empty folders.) It accomplishes the same goal of not touching the "main project" .gitignore, but is generally easier to work with.