DEV Community

Ravi Agheda
Ravi Agheda

Posted on

DS_Store in git, why ?

Mac user generally face this issue where .DS_Store file gets generated automatically and pops up in the git changes ( unless you've added it in ignore 😅 )

Image description

What is DS_Store?

  • It known as Desktop Services Store and it holds meta information about your folder’s thumbnails, settings, etc.

Why?

  • These files are created any time you navigate to a file or folder from the Finder on a Mac.

How to get rid of it?

  • Probably you already know the solution, .gitignore

Thank you for reading the short blog.

Top comments (3)

Collapse
 
jt89 profile image
jt89

since it misses the actual howto:
stackoverflow.com/a/107921

Collapse
 
raviagheda profile image
Ravi Agheda

Thanks for highlighting,
Technically same thing in the stackoverflow, it just remove and then add to .gitIgnore, but whether to remove or not is user's preferance.

Collapse
 
shrihari profile image
Shrihari Mohan

Oh it's a Mac file , never knew why it came on all my repos.