【发布时间】:2014-05-25 21:07:21
【问题描述】:
这是我的 .gitignore 文件的内容,它位于我的存储库的根目录中:
# 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
我的项目根目录中的 .DS_Store 文件被正确忽略,但 git status 给出:
$ 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)
那么为什么ios/.DS_Store 不被忽略?
在 OS X 10.9.2 上工作,使用 Apple 提供的 git 版本:“git version 1.8.5.2 (Apple Git-48)”
【问题讨论】: