Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Definitively delete the tracking of .DS_Store files in GIT [duplicate]

Tags:

git

I've a git repo where .DS_Store files are already tracked. Is there a way to completely ignore theme in every folder?

I know that before being tracked I can simply put .DS_Store in .gitignore, but I also know that it doesn't work if .DS_Store are already versioned.

like image 232
Luca Reghellin Avatar asked Nov 06 '13 11:11

Luca Reghellin


1 Answers

You need to remove them from the repo using git rm and then commit the changes.

git rm --cached "*.DS_Store"
git commit -m "remove all .DS_Store"
like image 183
Anshul Goyal Avatar answered Oct 25 '22 03:10

Anshul Goyal