参考自:http://blog.csdn.net/abc649395594/article/details/45318297
1.git rm –cached *.xcuserstate
2.git rm –cached *.xcuserdata
3.git rm –cached .DS_Store (我自己加的)
4.vim .gitignore
.gitignore文件为
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.xcuserstate
5.git commit -m “Ignore some files!”