Created
July 23, 2025 22:25
-
-
Save katagaki/68812f59ba94c1ac6df6dc13d34db54a to your computer and use it in GitHub Desktop.
Remove .DS_Store from a new Git repository.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From https://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-files-from-a-git-repository | |
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch | |
touch .gitignore | |
echo .DS_Store >> .gitignore | |
git add .gitignore | |
git commit --amend | |
git push -u origin main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment