第一步:进入git的代码仓库,执行以下的代码 (终端 cd 你的工程目录 .git)
git rm --cached *.xcuserstate
git rm --cached *.xcuserdata
vim .gitignore
添加以下
*.xcuserstate
project.xcworkspace
xcuserdata
UserInterfaceState.xcuserstate
project.xcworkspace/
xcuserdata/
UserInterface.xcuserstate
最后 git commit -m "Ignore some files!"