Skip to main content

Delete .DS_STORE files and add them to git as a sigle commit

This is how you can find for any file(s) you want to delete and push them as a single commit. In my case, I accidentally added some  .DS_STORE files that .gitignore of the repo did not have as an exclusion.

find . -name ".DS_Store" -print -delete
git ls-files --deleted | xargs git rm
git commit -m "Deleted .DS_Store files"
git push  . . .