zettelkasten

Search IconIcon to open search
Dark ModeDark Mode

Getting rid of .DS_Store from life

The whole hairy .DS_Store thing is annoying: it lurks in your repository all the time and appear on your changed files list all the time. Here’s how to banish .DS_Store from your programming life. In terminal, execute:

echo ".DS_Store" >> ~/.gitignore_global
echo "._.DS_Store" >> ~/.gitignore_global
echo "**/.DS_Store" >> ~/.gitignore_global
echo "**/._.DS_Store" >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global

Verify the global ignore file is included by cat ~/.gitconfig


Reference:

  1. https://gist.github.com/lohenyumnam/2b127b9c3d1435dc12a33613c44e6308