1. 退出xcdoe, 打開終端(Terminal),進入到你的項目目錄下git
2. 在終端鍵入 git rm --cached [YourProjectName].xcodeproj/project.xcworkspace/xcuserdata/[YourUsername].xcuserdatad/UserInterfaceState.xcuserstate
3. 在終端鍵入 git commit -m "Removed file that shouldn't be tracked"xcode
4. 在.gitignore文件中加入以下幾行spa
5. 從新打開Xcode commit, push。code