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

Posted 喜狼狼

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Git关于忽略Xcode工程中UserInterfaceState.xcuserstate文件的问题相关的知识,希望对你有一定的参考价值。

1.打开终端(Terminal),进入项目目录下

Last login: Sun Aug 13 13:38:10 on ttys001

xilanglangdeMacBook-Pro:~ xinshaofeng$ cd /Users/xinshaofeng/Work/Found 

xilanglangdeMacBook-Pro:Found xinshaofeng$ ls

Found Podfile README.md

Found.xcodeproj Podfile.lock

Found.xcworkspace Pods

2.在终端输入:

git rm --cached [YourProjectName].xcodeproj/project.xcworkspace/xcuserdata/[ YourUsername].xcuserdatad/UserInterfaceState.xcuserstate

xilanglangdeMacBook-Pro:Found xinshaofeng$ git rm --cached Found.xcodeproj/project.xcworkspace/xcuserdata/xinshaofeng.xcuserdatad/UserInterfaceState.xcuserstate

rm ‘Found.xcodeproj/project.xcworkspace/xcuserdata/xinshaofeng.xcuserdatad/UserInterfaceState.xcuserstate‘

3.在终端键入  git commit -m "Removed file that shouldn‘t be tracked"

xilanglangdeMacBook-Pro:Found xinshaofeng$ git commit -m "Removed file that shouldn‘t be tracked"

[master fc0601e] Removed file that shouldn‘t be tracked

 2 files changed, 4 insertions(+)

 delete mode 100644 Found.xcodeproj/project.xcworkspace/xcuserdata/xinshaofeng.xcuserdatad/UserInterfaceState.xcuserstate

xilanglangdeMacBook-Pro:Found xinshaofeng$ 

4.重新打开Xcode commit, push

 

以上是关于Git关于忽略Xcode工程中UserInterfaceState.xcuserstate文件的问题的主要内容,如果未能解决你的问题,请参考以下文章

Xcode 项目的 Git 忽略文件正在忽略 .swift 文件

Git 不会忽略 .gitignore 中的某些 Xcode 文件

Git忽略XCode项目的文件内容

text Xcode Objective-C语言使用git时要忽略文件配置

Xcode警告汇总分析

git :设置 object-c 的忽略文件