$ cat .gitignore
# OSX
*/.DS_Store
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
$ git status
On branch develop
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: Assets/Sprites/.DS_Store
no changes added to commit (use "git add" and/or "git commit -a")
是有在的.gitignore和狀態信息的更多不相關的文件的權利,但它本身的.gitignore沒有被修改,這個版本被提交。.DS_Store仍然出現在git的地位,儘管在的.gitignore
我該如何解決這個問題?
[Git diff不會忽略.gitignore中的指定文件]的可能重複(http://stackoverflow.com/questions/17820056/git-diff-doesnt-ignore-specified-files-in-gitignore) – 2014-09-06 13:33:38