3 ms·
I'm in the habit of just adding these things directly to .gitignore for repos which I'm a core contributor to. Things like: drafts/ backup/ *.bak
by pcthrowaway 4y ago
I'm in the habit of just adding these things directly to .gitignore for repos which I'm a core contributor to.
Things like:
drafts/
backup/
*.bak
ignored/
etc.
I don't really see the downside to just adding them to the tracked gitignore. If other people have a different convention and want to add these files/paths for some reason, it's easily discoverable to them why the files can't be added, and then we can have a discussion about what naming conventions we want.
- AndrewThrowaway 4y agoThe only problem I can see it "leaking" some information? "I see this guy has 'passwords/'" on his local machine, let's somehow sneakily merge new .gitignore to make them available publicly.
- asddubs 4y agosure, if "this guy" does "git add '*'" and neither reviews the commit, nor even does git status to see a file list of it and just pushes it straight to remote. if that's happening i think your repo might have other problems though
- pcthrowaway 4y agoI mean this doesn't really leak anything; passwords are usually stored in `.env` files anyway
- naavis 4y agoIt's not exactly best practice to store passwords in version control.
- pcthrowaway 4y agoyes I'm aware.. this is why .env should always be in .gitignore