uuid: - value: bbb0f7dc-a5f9-4f11-8a33-f8b234c0cc89 langcode: - value: en type: - target_id: daily_email target_type: node_type target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7 revision_timestamp: - value: '2025-05-11T09:00:20+00:00' revision_uid: - target_type: user target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849 revision_log: { } status: - value: true uid: - target_type: user target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849 title: - value: 'Ignoring things globally' created: - value: '2024-01-28T00:00:00+00:00' changed: - value: '2025-05-11T09:00:20+00:00' promote: - value: false sticky: - value: false default_langcode: - value: true revision_translation_affected: - value: true path: - alias: /daily/2024/01/28/ignoring-things-globally langcode: en body: - value: |

Yesterday's email was about repository-specific .gitignore files and different ways to write them.

But there's a setting that most people don't know about, where you can configure a global .gitignore file.

What I use it for

Whilst it doesn't replace repository-specific files, it's good for operating system-specific files - such as .DS_Store files on macOS.

I have a convention where I have a .ignored directory in a project, and everything in it should be ignored by Git.

Instead of adding this to every .gitignore file, and because it's specific to me, it's a good choice for a global ignore file.

Anything that affects multiple users - such as ignoring vendor or node_modules should still be set in each repository.

How do you add it?

Add this to your ~/.gitconfig or ~/.config/git/config file to set the path for your global ignore file:

[core]
        excludesFile = "~/.config/git/ignore"
      

Then, create the file and add what you want to ignore everywhere.

Just remember this is specific to you, and if others have something you've ignored globally and they haven't, they could still add and commit it.

format: full_html processed: |

Yesterday's email was about repository-specific .gitignore files and different ways to write them.

But there's a setting that most people don't know about, where you can configure a global .gitignore file.

What I use it for

Whilst it doesn't replace repository-specific files, it's good for operating system-specific files - such as .DS_Store files on macOS.

I have a convention where I have a .ignored directory in a project, and everything in it should be ignored by Git.

Instead of adding this to every .gitignore file, and because it's specific to me, it's a good choice for a global ignore file.

Anything that affects multiple users - such as ignoring vendor or node_modules should still be set in each repository.

How do you add it?

Add this to your ~/.gitconfig or ~/.config/git/config file to set the path for your global ignore file:

[core]
        excludesFile = "~/.config/git/ignore"
      

Then, create the file and add what you want to ignore everywhere.

Just remember this is specific to you, and if others have something you've ignored globally and they haven't, they could still add and commit it.

summary: null field_daily_email_cta: { }