Jesse Downing
Jesse Downing

Reputation: 354

Git .DS_Store file removal fails

In my git repo, I run

find . -name .DS_Store -print0

It shows a list of nested .DS_Store files. However, when I run:

find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch

It fails to remove the files.

Advice?

Upvotes: 0

Views: 284

Answers (1)

Adem Öztaş
Adem Öztaş

Reputation: 21506

You can't remove the .DS_Store folders on MacOS. So you can remove the .DS_Store files on git repository via on the following command.

echo .DS_Store >> .gitignore
git rm -f .DS_Store

Upvotes: 1

Related Questions