Skip to main content
Os

macOS .gitignore

.gitignore for os projects

View on GitHub

.gitignore Content

# ==============================================================================
# Created by https://gitignores.com/
# OPERATING SYSTEM TEMPLATE for macOS
# Website: https://www.apple.com/macos/
# Repository: https://github.com/ronald2wing/.gitignores
# ==============================================================================

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE OVERVIEW & USAGE NOTES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# • TEMPLATE TYPE: OPERATING SYSTEM TEMPLATE
# • PURPOSE: macOS system files and OS-specific artifacts
# • DESIGN PHILOSOPHY: Modular — combine with common templates
# • COMBINATION GUIDANCE: Combine with language or framework templates
# • SECURITY CONSIDERATIONS: No security patterns included — add common/security.gitignore
# • BEST PRACTICES: Review and customize patterns before use; test with git check-ignore
# • OFFICIAL SOURCES: macOS documentation and community best practices

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# OS-SPECIFIC PATTERNS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

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

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE CUSTOMIZATION & BEST PRACTICES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# 1. REVIEW: Examine all patterns before use
# 2. CUSTOMIZE: Adapt to your project's specific structure
# 3. TEST: Use `git check-ignore` to verify patterns
# 4. SECURE: Always protect sensitive data and credentials
# 5. UPDATE: Review periodically as technology evolves

# Combine with language or framework templates as needed:

# EXAMPLE COMBINATION:
# cat languages/python.gitignore \
#     common/security.gitignore \
#     os/macos.gitignore \
#     common/cache.gitignore | sort -u > .gitignore

Note: This file is fetched from GitHub and cached for 7 days.