Git - 忽略Xcode工程中UserInterfaceState.xcuserstate文件的問題


 

一、在同 .Git目錄下創建.gitignore文件。在文件中加入如下內容:

*.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

 

四、在終端鍵入  

git commit -m "Removed file that shouldn't be tracked"

 

五、重新打開Xcode 

git commit
git push

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM