Step 1 - (Skip to Step 2 if you don't have .DS_store currently in your repo)
Paste this into your terminal while you're in your directory to remove existing .DS_Store files from the repository:
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
Add this line: .DS_store
to the file .gitignore, which can be found at the top level of your repository (or create the file if it isn't there already). You can do this easily with this command in the top directory:
Congratulations, if you followed these steps, .DS_store
should not be an issue for you anymore!