These files are for your own machine / setup. You really have to ignore them.
However, you should not just add entries corresponding to these files in your .gitignore project. Instead, you should ignore these files with global .gitignore :
git config --global core.excludesfile <path-to-global-ignore-file>
Why not just add entries to your .gitignore project? Remember that this file will be used by all project staff, so you want to keep it clean and tidy; adding custom entries to a specific .gitignore repository will simply inflate / pollute the latter and contribute to unnecessary mental overhead.
For example, imagine one employee, Bob, works on Mac OS X, while another employee, Alice, works on Windows. Bob probably wants to ignore .DS_Store files , while Alice probably wants to ignore thumbs.db . However, Bob does not need to ignore the thumbs.db files, and Alice does not need to ignore the .DS_Store files. Therefore, they should not put a useless gitignore record on top of each other. They would be better off ignoring such files through the local .gitignore file for their machines.
source share