Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I have never met someone who would argue against this, I find it really weird that someone wouldn't want to have it in
We have a .dockerignore to prevent it from getting into the build, and even if it did get in, we have some bytes to spare -
ddephor45115yYou can have a gitignore file in any directory if you want. But IMO one in the root directory of the repo is an absolute must. It holds the global ignores for that repo, the ones no dev should handle more than once (when he puts 'em into the gitignore).
If one has some special habits that needs ignoring, every dev can build up a personal gitignore in his home directory.
Having everyone handle their own ignore files for everything is just a waste of time. -
@ddephor especially if a dev doesn't know there's a new directory that has to be ignored and boom, 500 junk files committed
-
nibor48775yYeah, don't commit the .gitignore for your node project, then sit back and watch some dick wad clone the project, make some changes and push node_modules to the repo.
-
@nibor That's exactly what's going to happen. This is a React app. At least I'm only here for 2 more months
-
john-doe9405yMake a poll to count what people think of this policy.
Options: good, bad, indifferent, retarded.
Post on Twitter under a fake account. Follow at least 400 devs. And wait for the results.
If you post the link here, I'd vote.
After having results, just share it to a bunch of co-workers and see if someone has the audacity to show the team lead.
Or just state your ground and commit the .gitignore file. -
If you add .gitignore to your .gitignore does it still enforce it but also not allow you to push changes to it?
-
@bkwilliams I THINK that if it's already tracked and part of the repo, then you add .gitignore to it, then it will still update because it's already tracked.
-
I once had to explain to a team lead that committing compiled CSS was a bad idea and that it should be ignored and compiled one in the production server. He argued that we shouldn't have to do that on the server (no ci server either) and then would keep wondering why everybody would have merge conflicts on the CSS file.
-
@psion1369 is murder legal in your country?
Imagine a dev forgetting to compile the css and then deploying to prod... -
josap2115yNot committing it seems a really odd practice and a very nice way to mess up thing. And besides, the reasoning behind it it's, to say the least, faulty. In the .gitignore file you'll probably will have files that you don't want in your build/repo (e.g. keys), so not committing it might cause such files ending up in the build/repo, which is likely more dangerous than having a .gitignore file pushed to "origin"
-
Tell him “do you want a .gitignore which is a few kb large or a multi-gb node_modules folder which will inevitably by pushed by mistake at some point?”
-
@kescherRant @alexbrooklyn it was even worse. He refused to learn git on the command line, insisted that the GUI tools he always cycled through were the better options. Every month he was installing a new GUI when the rest of the team switched to cli and managed to stay there.
-
@ybautista Agreed, I only use my IDE's conflict resolver for git related stuff, the rest is all cli :D
-
Hazarth95025y.gitignore should definitely be part of the repo. To say that it shouldn't be part or the codebase is ridiculous at minimum because the codebase is hosted in a git repo... And there's always a minimal configuration required that everyone should share, so what? He's gonna send it over email to everyone? Or just wait for a mistake to happen so he can then flex his ego about how stupid they were for making a mistake? Bad Lead
-
I wonder if you told your lead to .gitignore the .gitignore file and commit that 🤔
-
@halfflat
Okay, but what about subdirectories like "build"? They should not be included! -
@halfflat
If I ever find out who you are and work with you, I'mma add node_modules to the repo intentionally.
Related Rants
What are your feelings on committing your .gitignore file to the repo? I argue that you SHOULD commit the .gitignore file because you are much less likely to accidentally commit things you don't want.
My team lead just told me that he doesn't want the .gitignore file in the repo because it's not part of the build.
question
git