<p>Following last week's email on <a href="/daily/2024/01/27/gitignore-inclusive-or-exclusive">different ways to write .gitignore files</a>, friend of the list, Daniel Harper, sent me this reply (shared with permission):</p>
<blockquote>
<p>I had a debate once about this topic and we settled on ignore as the filename explicitly describes what it should be doing ie. It's not .gitallow 😆</p>
</blockquote>
<p>This is a good point.</p>
<p>What do people expect to see in a <code>.gitignore</code> file?</p>
<p>A list of directories and files to be ignored or allowed?</p>
<p>Based on the filename, it should be the former.</p>
<p>This would be clearer for people when they first open the file.</p>
<p>However, if you decide to use the allow approach instead, document it in an <a href="/daily/2022/09/23/adrs-technical-design-documents">ADR or design document</a> and why you decided to do it that way and provide context for people working on the codebase in the future.</p>
<p>Following last week's email on <a href="/daily/2024/01/27/gitignore-inclusive-or-exclusive">different ways to write .gitignore files</a>, friend of the list, Daniel Harper, sent me this reply (shared with permission):</p>
<p>I had a debate once about this topic and we settled on ignore as the filename explicitly describes what it should be doing ie. It's not .gitallow 😆</p>
</blockquote>
<p>This is a good point.</p>
<p>What do people expect to see in a <code>.gitignore</code> file?</p>
<p>A list of directories and files to be ignored or allowed?</p>
<p>Based on the filename, it should be the former.</p>
<p>This would be clearer for people when they first open the file.</p>
<p>However, if you decide to use the allow approach instead, document it in an <a href="/daily/2022/09/23/adrs-technical-design-documents">ADR or design document</a> and why you decided to do it that way and provide context for people working on the codebase in the future.</p>