Skip to content

Instantly share code, notes, and snippets.

@vybstat vybstat/ds_store_removal
Last active Sep 25, 2015

What would you like to do?
How to remove .DS_Store file from GitHub that Mac OS X creates
# remove .DS_Store file from GitHub that MAC OS X creates
# find and remove .DS_Store
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
# create .gitignore file, if needed
touch .gitignore
echo .DS_Store > .gitignore
# push changes to GitHub
git add .gitignore
git commit -m '.DS_Store removed'
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.