Definitively delete the tracking of .DS_Store files in GIT

This question already has an answer here:

  • How to make Git “forget” about a file that was tracked but is now in .gitignore?

    15 answers

  • How to determine if Git merge is in process
  • Make git ignore the date in PDF files
  • How to deactivate the Xcode git feature? (remove git integration)
  • Best Version control for lone developer
  • git branch (no branch)
  • Git: reset/revert a whole branch to another branches state?
  • Use GIT fork / branches
  • How to delete commits with egit?
  • .gitignore does not understand my folder wildcard on windows
  • What's the meaning of 'origin' in 'git push origin master'
  • restore windows command prompt tools after git bash replace them with unix tools
  • Composer - Requested Package exists as but these are rejected by your constraint
  • 2 Solutions collect form web for “Definitively delete the tracking of .DS_Store files in GIT”

    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"
    

    You need to remove them in some way or another, using git rm. Of course, this may be easier than going through them manually:

    find -name .DS_Store -print0 | xargs -0 git rm
    
    Git Baby is a git and github fan, let's start git clone.