DevBento logoDevBento
Tools/.gitignore Generator/Gitignore for macOS

Gitignore for macOS

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.

Languages & Runtimes
Editors & IDEs
Operating Systems
Frameworks & Tools
.gitignore1 template · 13 rules
# 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
Send to:
Related Tools
+/-Diff Checker
Compare two blocks of text side by side or inline with character-level highlighting. Find additions, removals, and changes instantly in your browser.
</>SQL / CSS / HTML / JavaScript / TypeScript
Format and minify SQL queries, CSS stylesheets, HTML markup, JavaScript, and TypeScript with syntax highlighting. Indent, beautify, or compress code in your...

Gitignore for macOS

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.

What’s Included

macOS System Files

Xcode (if applicable)

Time Machine

How to Use

  1. Click “Generate” to create the .gitignore file
  2. Copy the generated content
  3. Create a .gitignore file in your project root
  4. Paste the content and save
  5. If you have existing .DS_Store files, remove them from git tracking

Removing Existing .DS_Store Files

If .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.

© 2026 devbento.dev · built local-firstChangelog