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