Member-only story

What needs to be in a Git Ignore for macOS

Alonso Del Arte
5 min readDec 28, 2023

--

Photo by Erika Fletcher on Unsplash

A long time ago I noticed that Apple computers put a lot of files on removable drives that don’t mean anything to operating systems on other computers that you might plug those drives into.

Git also notices those files. If they’re not listed in a Git repository’s Git Ignore, they might get picked up by the remote repository and cause merge conflicts later on.

That’s the worst kind of edit conflict: the ones caused by a little detail no one on the team cared about before it became a problem.

Therefore, any Git repository that might get worked on by programmers using Apple computers should have a Git Ignore listing certain special macOS files be kept out of the repository.

.DS_Store
.AppleDouble
.LSOverride
Icon
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

I’m not going to explain all of these. Just a couple of these will be enough to give you an idea as to why those and the others should be left out of the repository.

The most famous “offender” here is .DS_Store. On a Mac, you can arrange icons in creative or whimsical ways, and .DS_Store is what makes it possible for your Mac to remember…

--

--

Alonso Del Arte
Alonso Del Arte

Written by Alonso Del Arte

is a Java and Scala developer from Detroit, Michigan. AWS Cloud Practitioner Foundational certified

No responses yet