Oliver Davies
5eba6de81a
This is a follow-up to commit 3be9031de8
as each daily email has a `permalink` value that overrides the default
content type permalink.
38 lines
1.4 KiB
Markdown
38 lines
1.4 KiB
Markdown
---
|
|
title: .gitignore or .gitallow
|
|
date: 2024-02-05
|
|
permalink: daily/2024/02/05/gitignore-or-gitallow
|
|
snippet: |
|
|
Is it a .gitignore or .gitallow file?
|
|
tags:
|
|
- software-development
|
|
- git
|
|
---
|
|
|
|
{% block content %}
|
|
Following last week's email on [different ways to write .gitignore files][previous], friend of the list, Daniel Harper, sent me this reply (shared with permission):
|
|
|
|
> 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 😆
|
|
|
|
This is a good point.
|
|
|
|
What do people expect to see in a `.gitignore` file?
|
|
|
|
A list of directories and files to be ignored or allowed?
|
|
|
|
Based on the filename, it should be the former.
|
|
|
|
This would be clearer for people when they first open the file.
|
|
|
|
However, if you decide to use the allow approach instead, document it in an [ADR or design document][adr] and why you decided to do it that way and provide context for people working on the codebase in the future.
|
|
|
|
[adr]: {{site.url}}/archive/2022/09/23/adrs-technical-design-documents
|
|
[previous]: {{site.url}}/archive/2024/01/27/gitignore-inclusive-or-exclusive
|
|
{% endblock %}
|
|
|
|
{% block cta %}
|
|
P.S. Do you need immediate access to an expert Drupal Developer? [With my Drupal development subscription][subscription], make unlimited requests for a fixed monthly price in less time than posting to a job board!
|
|
|
|
[subscription]: {{site.url}}/subscription
|
|
{% endblock %}
|