删除GitHub中的任何.DS_Store

use*_*463 3 file github gitignore

我在GitHub上有一个存储库:

https://github.com/ludovicriffault/feed-tastic

我无法删除每个文件夹和子文件夹中的.DS_Store文件.我已经尝试了很多东西,比如文件.gitignore和Stackoverflow中的一些答案,但没有任何作用......

有什么想法解决这个问题?提前致谢!

Von*_*onC 5

您需要克隆您的仓库,然后

find . -name ".DS_Store" -exec git rm --cached -f {} \;.
git commit -m "delete files"
git push
Run Code Online (Sandbox Code Playgroud)

我们的想法是将本地文件保存为" .DS_Store",同时将它们从git repo中删除.
.gitignore将仅工作,如果那些" .DS_Store"首先从索引中删除,因而有" git rm --cached -f"(见git rm).