Monday, February 17, 2020

How to Remove and Ignore .DS_Store file from Git Repo

 

 

1)  Remove the existing .DS_Store files from the repository 
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch.
2) Add the line .DS_Store to .gitignore file

echo .DS_Store >> .gitignore

3) Commit the .gitignore to the repository

1
2
3
4
5
6
7


git add .gitignore


git commit -m ".DS_Store files ignored"
  

Refer to documentation to learn more about .gitignore

No comments:

Post a Comment