Saturday, April 6, 2024
· One min read
Globally ignore .DS_Store
from all the git repos in macOS
# remove any existing files from the repo, skipping over ones not in repo
find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch
# specify a global exclusion list
git config --global core.excludesfile ~/.gitignore
# adding .DS_Store to that list
echo .DS_Store >> ~/.gitignore
macos - How can I Remove .DS_Store files from a Git repository? - Stack Overflow
List Git remote branches
git branch -r