當我試圖提交我的代碼項目時,它顯示一個名爲'UserInterfaceState.xcuserstate'的文件,該文件必須提交。一旦我提交併嘗試將我的項目推送到git,Xcode給了我一個彈出消息,說'工作副本'應用程序'具有未提交的更改'。當我嘗試再次提交時,我得到相同的文件'UserInterfaceState.xcuserstate'再次提交。任何人都可以幫助我嗎?UserInterfaceState.xcuserstate在Xcode中使用git時未提交
3
A
回答
14
UserInterfaceState.xcuserstate
就是Xcode中保存您的GUI的狀態,如窗口位置,打開的標籤,擴展節點項目檢查等
簡單地調整Xcode的窗口將導致此文件來改變和修飾被標記您的源代碼管理系統。您可以讓SCM系統忽略對項目本身不重要的特定文件。
您希望Git忽略該文件,您可以將其添加到.gitignore file
,但必須刪除跟蹤。要停止跟蹤當前跟蹤的文件,請使用git rm –cached
。
git rm --cached ProjectFolder.xcodeproj/project.xcworkspace/xcuserdata/myUserName.xcuserdatad/UserInterfaceState.xcuserstate
git commit -m "Removed file that shouldn't be tracked"
之後的.gitignore
將採取UserInterfaceState.xcuserstate
效果現在起,你不會看到一個彈出消息說,'The working copy "app" has uncommitted changes.'
相關問題
- 1. GIT - 每小時(提交和未提交)
- 2. xcode git commit沒有提交
- 3. Xcode 4 - Git - 全部提交?
- 4. Xcode git沒有提交project.pbxproj
- 5. 在Xcode(使用Git)中提交任何圖像文件?
- 6. 提交使用Git
- 7. Git - 在提交時顯示提交者
- 8. 自動Xcode Git提交提示
- 9. 在git中查找所有未提交的提交?
- 10. Git臨時提交
- 11. 我如何在git中提交一個未提交的提交日期?
- 12. 如何在git中提交提交?
- 13. Xcode 8在提交給gitHub時忽略git configs?
- 14. 刪除使用Git提交
- 15. Xcode的Git推送/提交日期
- 16. Xcode版本控制GIT - 提交後提交
- 17. 在Xcode中使用svn/git
- 18. 從遠程git存儲庫中恢復未提交的提交
- 19. 無法使用Git集成提交Xcode項目
- 20. 使用git和xcode,一些文件夾不提交
- 21. 在Xcode中標記提交
- 22. 在Xcode 4.2中提交project.pbxproj
- 23. 在Git中刪除提交
- 24. 在git中替換提交
- 25. 使用Cornerstone,我該如何忽略Xcode的UserInterfaceState.xcuserstate文件?
- 26. 在GIT中,使用git log獲取提交路徑
- 27. Vi使git提交時出錯
- 28. Chrome在提交按鈕時使用AngularJS指令時未提交表單
- 29. git是'在改變分支時M'erging未提交的編輯?
- 30. 在Xcode 4中提交應用程序