Created
October 28, 2021 06:19
-
-
Save RyadPasha/a9b86e09a8bacba0c4d20033ae8675d8 to your computer and use it in GitHub Desktop.
How to remove .DS_Store file from GitHub that macOS creates
This file contains 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
# remove .DS_Store file from GitHub that macOS 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