Keep macOS folder metadata out of your project.
Add this line to the project .gitignore. A name pattern without a slash can match at any directory level. This is a suggested rule based on Git ignore semantics.
.DS_StoreUse git ls-files to inspect tracked names. If it is tracked, an ignore rule alone is not enough. Review the exact paths before removing them from the index.
git ls-files
git check-ignore -v --no-index .DS_StoreA repository .gitignore is shared. .git/info/exclude is local to that repository. A configured core.excludesFile can apply personal ignore rules across repositories. Pick the audience intentionally.
Deleting every hidden file or running git clean with force is not needed to ignore .DS_Store. Hidden files can include important configuration and secrets.
Which ignore file is normally shared through commits?
Choose an answer.
Command blocks are syntax examples checked against official documentation, not fabricated terminal output. Replace uppercase placeholders with your actual names and inspect status before commands that change work.