Discussion about this post

User's avatar
Pradumna Saraf's avatar

Good one, Eddie

Expand full comment
Simon Shine's avatar

Counter-argument 1: Different projects need different project-specific gitignores: Rust should ignore target/ and Node should ignore node_modules/. Any tool extension that your project's build pipeline depends on that produces artifacts extends this list. The list is finite and well-defined.

Imagine a Node project starts using Yarn, and Yarn produces some lockfile we don't want committed, now every individual contributor must realize this and extend their system-global gitignore, but only for the correct projects.

Counter-argument 2: A project-specific .gitignore is a tool to lower garbage content in commits by decreasing the effort for inexperienced or lazy collaborators. The .gitignore only needs to contain things actually encountered. For very active Open Source projects, you may want to just put the extra effort into code reviews.

A system-global .gitignore solves a problem for you.

A project-specific .gitignore solves a problem for many people.

Expand full comment
2 more comments...

No posts