- CD to your GitHub folder
cd (drag & drop your folder into terminal after typing cd)
- Run this
find . -name ".DS_Store" -type f -delete
-
Quickly commit your repos*
-
Run this:
git config --global core.excludesfile "~/.gitignore" && echo .DS_Store >> ~/.gitignore
- moves to the folder in terminal where you're going to purge .DS_Store's
- recursively deletes all .DS_Stores inside that folder & subfolders
- .DS_Stores are automatically recreated, so we have to commit fast before they are recreated by Finder
- adds .DS_store to your global git config, will create one if you don't have one already
- If you can't commit in time, try this for a true PERMA f--k off experience:
sudo find / -name “.DS_Store” -depth -exec rm {} \;
- milo tek - 14/06/25 - The ".DS_Store" banisher
- Source for deleting .DS_Store
- Source for global gitignore command
- I HATE YOU .DS_STORE. YOU MAKE ME LOOK A FOOL! YOU SHALL EXIST NO MORE!