My gitignore is just a pile of things I _always_ want to ignore:
# OS
.DS_Store
# Editors
.vscode-server/
.idea/
# Javascript
.npm/
node_modules/
...more stuff per language
I find it really nice to just keep all that in one place and not have to configure it per project. There's nothing too broad or situational in there that might get in the way - those kinds of things can go into the project specific .gitignores.
There's also `git status --ignored` to check if you're missing anything.
My reason for having each and every common ignore in each individual repo is that on the off chance that someone else wants to contribute to any of my projects, those files are already ignored for those people too.
And also, sometimes I work from different machines and I don’t really want to have yet another dotfile to sync between all my current and future machines.
(Yes, I know dotfile managers exist, but I literally only care about syncing my zsh config files and one or two other dotfiles mainly so I do that with my own little shell script and basically don’t care about syncing other dotfiles.)
Generally agree with you but I'm not going to clutter my project's .gitignore with stuff that's in the responsibility of the user to keep in their own ignore list like .DS_Store.
E.g. Each js project gets a /.npm /node_modules, each py proj a .pyc etc...
Editor is generally one per project which checked in config (.vscode) and if you want to use vim, have your own rules for ~ which you likely have anyway.
Also, both are not exclusive: .env can be checked in and in .gitignore
I just mean, it’s intentionally not a fancy setup with all kinds of things.
Just the most essential stuff and some symlinks. For the few dotfiles I really care about.
In an ideal world, I wouldn’t need any dotfiles at all. And my home directories would only contain files that I myself put there. Like my photos, my music, and code that I write. Those kinds of things.
That’s the main reason I don’t like managing all of my dotfiles. Because I don’t really want them in the first place. The only thing I want less in my home dirs but which I also have to live with is all of the other garbage that programs I use put there on their own. Like caches and different weird files that the programs decided should be there.
There's also `git status --ignored` to check if you're missing anything.