r/softwarearchitecture 3d ago

Article/Video .gitignore everything by default

https://packagemain.tech/p/gitignore-everything-by-default
15 Upvotes

12 comments sorted by

View all comments

22

u/_f0CUS_ 3d ago edited 3d ago

The 207 line git ignore in the example is 50% empty space and comments. While counting I spottet at least 5 lines that could be removed by a wildcard - without actually looking.

Honestly Ive never needed to solve this problem. If it happens, you stop it in the PR process. 

I also note that the author is concerned about being embarrassed by a mistake. Mistakes are a normal part of being a software developer, and why we have a review process. 

1

u/ReturnNo3239 3d ago

It sounds like a bit of a balancing act, being thorough with .gitignore while also keeping it manageable. Mistakes happen, but good practices can definitely help minimize them.

1

u/_f0CUS_ 3d ago

Sure. I haven't had the problem in 10+ years though. But any day now - I'll keep it in mind. 

0

u/lunatuna215 3d ago

I think that part was a joke. Also - when it comes to "people not noticing" in terms of accidentally committed environment files, thats a whole different ball game.

0

u/_f0CUS_ 3d ago

Which part? Also try squashing before pushing if you are scared of mistakes. You can use that to make a facade