user990463
user990463

Reputation: 439

Removing any .DS_Store in GitHub

I have a repository over at GitHub :

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

And I can't remove the .DS_Store files in every folder and subfolder. I've tried many things like the file .gitignore and some answers here in Stackoverflow but nothing works...

Any idea to fix that? Thanks in advance!

Upvotes: 3

Views: 4569

Answers (1)

VonC
VonC

Reputation: 1324228

You need to clone your repo, and then

find . -name ".DS_Store" -exec git rm --cached -f {} \;.
git commit -m "delete files"
git push

The idea is to keep locally your ".DS_Store", while removing them from the git repo.
The .gitignore will work only if those ".DS_Store" are first removed from the index, hence the "git rm --cached -f" (see git rm).

Upvotes: 8

Related Questions