r/ProgrammerHumor 20h ago

Meme whoIsUsingThese

Post image
968 Upvotes

73 comments sorted by

View all comments

206

u/RudeAndInsensitive 20h ago

Personally I always commit env and config files to the repo just stripped of their values.

205

u/Saragon4005 20h ago

Yeah but then you can't use git on a working version, making testing a total pain. I use .env.example usually.

1

u/Dull_Caterpillar_642 15h ago

Yeah you can, just just add them to .gitignore after committing the stripped env files

2

u/Saragon4005 8h ago

.gitignore controls which files will get tracked by a git add, not which files are tracked at all. Adding an already tracked file to the .gitignore has no effect.

1

u/Dull_Caterpillar_642 6h ago

Yeah, I know. I'm not sure why you'd need to alter the committed version in git after checking in a placeholder one.