简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM