轉(zhuǎn)自:http://blog.csdn.net/lovenjoe/article/details/50053255
解決了我的問題呀闻,借過來記一下萍启。
一、在同 .git目錄下創(chuàng)建.gitignore文件局服。在文件中加入如下內(nèi)容:
*.xcuserstate
project.xcworkspace
xcuserdata
UserInterfaceState.xcuserstate
project.xcworkspace/
xcuserdata/
UserInterface.xcuserstate
二淫奔、退出xcdoe, 打開終端(Terminal)唆迁,進入項目目錄下唐责。
三鳞溉、在終端鍵入
git rm --cached [YourProjectName].xcodeproj/project.xcworkspace/xcuserdata/[ YourUsername].xcuserdatad/UserInterfaceState.xcuserstate
其中 [YourProjectName].xcodeproj/project.xcworkspace/xcuserdata/[ YourUsername].xcuserdatad/UserInterfaceState.xcuserstate 可以在git status里看到,復(fù)制過來
四鼠哥、在終端鍵入
git commit -m "Removed file that shouldn't be tracked"
五熟菲、重新打開Xcode commit, push。