logoalt Hacker News

matthewmc3today at 1:31 PM4 repliesview on HN

I'm not convinced about ignoring everything, but one of the best changes I ever made to my git workflow was ignoring all dotfiles by default by adding `.*` to ~/.config/git/ignore.

My projects do now have to have a boiler plate of unignoring the common ones (!.gitignore, !.gitattributes, !.github, !.editorconfig, etc), but then I'm free at any point to throw .foo.lang files, or .tmp/.cache dirs, or Claude helpers like .code_analysis.md, or .todos.txt, or whatever in my project without managing the fallout of forgetting to manage the .gitignore. I'm surprised more people don't go this route.


Replies

GranPCtoday at 2:35 PM

Couldn't you put !.gitignore et al in your global config file?

hansvmtoday at 3:17 PM

I normally go with `.*/` -- I find that hidden files are much more likely than hidden directories to be useful.

flexagoontoday at 2:37 PM

I have `playground/` in my ignore config, that way I can just create a playground directory for any project and do stuff in there

show 1 reply
der_gophertoday at 1:46 PM

I do the same