Skip to content

Instantly share code, notes, and snippets.

@vybstat
Last active May 6, 2024 16:07
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save vybstat/1680bef4715bfbcb0268 to your computer and use it in GitHub Desktop.
Save vybstat/1680bef4715bfbcb0268 to your computer and use it in GitHub Desktop.
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
@MelissaKaulfuss
Copy link

Thank you so much! I just used this :)

@barisozdizdar
Copy link

Thank you so much for that! Just saved my ass!

@Madd-G
Copy link

Madd-G commented Apr 15, 2022

Thank you so much

@abrizah
Copy link

abrizah commented Jul 28, 2022

Huge thanks!

@LizVizardini
Copy link

Thank you very much!

@kristianbrandser
Copy link

Thanks!

@YoannaPo
Copy link

Thank you! This helped me a lot!

@yobinauq
Copy link

yobinauq commented Jan 9, 2024

Thank you a lot, helped me a lot!

@Senqxi
Copy link

Senqxi commented Mar 2, 2024

It's the year 2024 thank you for helping out with this!!!

@amitojshah-singh
Copy link

thank you so much

@Asdegh
Copy link

Asdegh commented Apr 9, 2024

Thank you very much!!! This method really works!

@zargam
Copy link

zargam commented May 6, 2024

thank you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment