If you are using a Mac, chances are that you have a lot of .DS_Store files in all kinds of folders. While they don’t cause any problems, it might be ugly if these files appear in your GitHub repositories. How to delete and ignore all of them? This thread on Stack Overflow helped me quite a bit.
First, delete all .DS_Store files
The following solution came from …