Skip to content

Conversation

@as1605
Copy link

@as1605 as1605 commented Jan 26, 2024

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 as1605 changed the title Added .DS_Store for macOS filesystem Need to ignore .DS_Store from macOS filesystem Jan 26, 2024
@Sil-P
Copy link

Sil-P commented Feb 2, 2024

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.

@as1605 as1605 closed this by deleting the head repository Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants