{ "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": "\n

Yesterday's email was about repository-specific .gitignore files and different ways to write them.<\/p>\n\n

But there's a setting that most people don't know about, where you can configure a global .gitignore<\/code> file.<\/p>\n\n

What I use it for<\/h2>\n\n

Whilst it doesn't replace repository-specific files, it's good for operating system-specific files - such as .DS_Store<\/code> files on macOS.<\/p>\n\n

I have a convention where I have a .ignored<\/code> directory in a project, and everything in it should be ignored by Git.<\/p>\n\n

Instead of adding this to every .gitignore<\/code> file, and because it's specific to me, it's a good choice for a global ignore file.<\/p>\n\n

Anything that affects multiple users - such as ignoring vendor<\/code> or node_modules<\/code> should still be set in each repository.<\/p>\n\n

How do you add it?<\/h2>\n\n

Add this to your ~\/.gitconfig<\/code> or ~\/.config\/git\/config<\/code> file to set the path for your global ignore file:<\/p>\n\n

[core]\n  excludesFile = \"~\/.config\/git\/ignore\"\n<\/code><\/pre>\n\n

Then, create the file and add what you want to ignore everywhere.<\/p>\n\n

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.<\/p>\n\n ", "format": "full_html", "processed": "\n

Yesterday's email was about repository-specific .gitignore files and different ways to write them.<\/p>\n\n

But there's a setting that most people don't know about, where you can configure a global .gitignore<\/code> file.<\/p>\n\n

What I use it for<\/h2>\n\n

Whilst it doesn't replace repository-specific files, it's good for operating system-specific files - such as .DS_Store<\/code> files on macOS.<\/p>\n\n

I have a convention where I have a .ignored<\/code> directory in a project, and everything in it should be ignored by Git.<\/p>\n\n

Instead of adding this to every .gitignore<\/code> file, and because it's specific to me, it's a good choice for a global ignore file.<\/p>\n\n

Anything that affects multiple users - such as ignoring vendor<\/code> or node_modules<\/code> should still be set in each repository.<\/p>\n\n

How do you add it?<\/h2>\n\n

Add this to your ~\/.gitconfig<\/code> or ~\/.config\/git\/config<\/code> file to set the path for your global ignore file:<\/p>\n\n

[core]\n  excludesFile = \"~\/.config\/git\/ignore\"\n<\/code><\/pre>\n\n

Then, create the file and add what you want to ignore everywhere.<\/p>\n\n

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.<\/p>\n\n ", "summary": null } ] }