DEV Community

Oliver Davies
Oliver Davies

Posted on • Originally published at oliverdavies.uk on

.gitignore or .gitallow

Following last week's email on different ways to write .gitignore files, 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 and why you decided to do it that way and provide context for people working on the codebase in the future.

P.S. Do you need immediate access to an expert Drupal Developer? With my Drupal development subscription, make unlimited requests for a fixed monthly price in less time than posting to a job board!

Top comments (0)