Generate a complete .gitignore file for macOS projects. Includes .DS_Store, Thumbs.db, and other OS-specific files that should never be committed to git.
# macOS .DS_Store .AppleDouble .LSOverride ._* .DocumentRevisions-V100 .fseventsd .Spotlight-V100 .TemporaryItems .Trashes .VolumeIcon.icns .com.apple.timemachine.donotpresent .apdisk Icon\r # Generated with devbento.dev/tools/gitignore-generator
This example generates a comprehensive .gitignore file for macOS development. It includes patterns for .DS_Store files, macOS system files, Xcode artifacts, and other Apple-specific files that shouldn’t be committed to version control.
.DS_Store: Finder folder settings._*: macOS resource forks.AppleDouble: macOS extended attributes.LSOverride: Finder icon cache.Spotlight-V100: Spotlight index.Trashes: Trash folderIcon?: Custom icon files*.xcuserdata: User-specific Xcode settings*.xcworkspace: Workspace files (usually)DerivedData/: Build artifacts*.hmap: Header maps*.ipa: iOS app archives*.dSYM.zip: Debug symbols*.dSYM: Debug symbols folder*.backup: Time Machine backups.gitignore file in your project rootIf .DS_Store files are already tracked in your repository:
# Find and delete all .DS_Store files
find . -name .DS_Store -delete
# Untrack them from git
git rm --cached .DS_Store
# Add to .gitignore (if not already there)
echo ".DS_Store" >> .gitignore
# Commit the changes
git add .gitignore
git commit -m "Remove .DS_Store files from tracking"
Set up a global gitignore to ignore macOS files in all your projects:
# Create global gitignore
echo -e ".DS_Store\n._*\n.AppleDouble\n.LSOverride\n.Spotlight-V100\n.Trashes\nIcon?" > ~/.gitignore_global
# Configure git to use it
git config --global core.excludesfile ~/.gitignore_global
This way, you never have to add macOS-specific patterns to each project’s .gitignore.
Nothing you paste leaves this tab. Every tool runs entirely in your browser — no upload, no server, no account.