I created a .gitignore_global file in ~/Users/Tony/.gitignore_global
, which is also the path where the .gitconfig
is stored.
This is what is inside the .gitconfig
:
[core]
excludesfile = ~/.gitignore_global
This is what is inside the .gitignore_global
:
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# CocoaPods #
#############
Pods
# SVN #
#######
*.svn
.svn/*
# Xcode #
#########
build/
DerivedData
profile
xcuserdata
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3
*.mode1
*.mode1v3
*.mode2v3
*.moved-aside
*~.nib
*.pbxuser
*.perspective
*.perspectivev3
*.swp
*.xccheckout
I do not understand why the .gitignore_global
file isn't working. The .DS_Store
files are still being detected by git.
I had already tried comments like "git rm --cached .DS_Store
" and tried others solutions found on Stack Overflow, however git is still detecting the .DS_Store
files.