This is the content of my .gitignore file, which is at the root of my repository:
# grails stuff to ignore
target
*.iml
*.ipr
.idea
*.log
*.swp # vi swap files
.DS_Store # OS X Finder cache files
# cocoapods stuff to ignore
Pods
Podfile.lock
The .DS_Store
file in my project root directory is correctly ignored, but git status gives:
$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
ios/.DS_Store
nothing added to commit but untracked files present (use "git add" to track)
So why is ios/.DS_Store
not ignored?
Working on OS X 10.9.2, using the git version that Apple supplies: "git version 1.8.5.2 (Apple Git-48)"