Git关于忽略Xcode工程中UserInterfaceState.xcuserstate文件的问题

来源:互联网 发布:手机声音美化软件 编辑:程序博客网 时间:2024/05/22 15:44


一、在同 .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 commit, push。


0 0
原创粉丝点击