git can be configured to ignore .DS_Store by default - in your home directory, make a .gitignore file using the usual format, then do "git config --global core.excludesfile ~/.gitignore".
Better still is to put it in ~/.config/git/ignore and leave your core.excludesFile unset, as that's the default path and will therefore live right next to your config file.
> Patterns which should be version-controlled and distributed to other repositories via clone (i.e., files that all developers will want to ignore) should go into a .gitignore file.
> Patterns which are specific to a particular repository but which do not need to be shared with other related repositories (e.g., auxiliary files that live inside the repository but are specific to one user’s workflow) should go into the $GIT_DIR/info/exclude file.
> Patterns which a user wants Git to ignore in all situations (e.g., backup or temporary files generated by the user’s editor of choice) generally go into a file specified by core.excludesFile in the user’s ~/.gitconfig. Its default value is $XDG_CONFIG_HOME/git/ignore. If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/ignore is used instead.
By that logic it should be in your global excludes file. It practice it will save more time if you just add it to your project's .gitignore instead of wasting time having everyone else configure their system. O(1) amount of work compared to O(n)
git config --global core.excludesfile ~/.gitignore-global echo .DS_Store >> ~/.gitignore-global
reply