gitignore icon indicating copy to clipboard operation
gitignore copied to clipboard

Need to ignore .DS_Store from macOS filesystem

Open as1605 opened this issue 1 year ago • 1 comments

Reasons for making this change:

In macOS, there is a hidden system-generated file .DS_Store which is not important for git, but always gets added to commits making them dirtier.

Links to documentation supporting these rule changes:

WikiPedia:

.DS_Store files may impose additional burdens on a revision control process, since they are frequently changed and can therefore appear in commits, unless specifically excluded.

Microsoft:

Corrupted .DS_Store files can prevent OneDrive from syncing correctly. Deleting the corrupted files can help restore normal sync operation. No data is lost by deleting the corrupted files as Mac Finder only creates .DS_Store files to store viewing options, such as the positions of icons, size of the Finder window, and window backgrounds.

Adobe:

These files contain information about system configuration. If you upload them along with other files, the files can be misused to obtain information about your computer.

Apple:

By enticing a user to open a directory containing a maliciously crafted .DS_Store file, an attacker may cause arbitrary code execution. This update addresses the issue through improved bounds checking.

If this is a new template:

  • Link to application or project’s homepage: TODO

@shiftkey @bdougie

as1605 avatar Jan 26 '24 08:01 as1605

The global ignore should be used for OS-specific files: https://github.com/github/gitignore/tree/main/Global#globally-useful-gitignores

A comment like the one for PyCharm may be added instead, if maintainers find this to be a common request. As https://github.com/github/gitignore/blob/main/Global/macOS.gitignore has many rules, I'd rather not include the whole thing.

Sil-P avatar Feb 02 '24 12:02 Sil-P