Xcode 项目导航器中的问号是什么意思?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8525177/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What Does Question Mark Mean in Xcode Project Navigator?
提问by Kevin_TA
In the project navigator in Xcode, I am not sure what the ? is trying to tell me next to the file name.
在 Xcode 的项目导航器中,我不确定 ? 正试图告诉我旁边的文件名。
I am sure it is not a coincidence that this is the same file that I dragged from my root directory for the project to the Classes folder (because the .mm file was there and I wanted them to be together). The project still compiles just fine, however my code sense broke recently and I am wondering whether this may be part of the issue.
我确信这与我从项目的根目录拖到 Classes 文件夹中的文件相同,这并非巧合(因为 .mm 文件在那里并且我希望它们在一起)。该项目仍然编译得很好,但是我的代码意识最近崩溃了,我想知道这是否可能是问题的一部分。
Thanks!
谢谢!
回答by Michael Krelin - hacker
It's the file untracked by source control.
这是源代码管理未跟踪的文件。
回答by da Rocha Pires
回答by Mugs
Those are uncommitted files if your using GIT, you need to right click Source Control>Commit Selected File manually. It should take away the "?" on the new version of Xcode 6.3.2 as of today
如果您使用 GIT,那些是未提交的文件,您需要右键单击源代码管理>手动提交选定的文件。它应该去掉“?” 截至今天,在新版本的 Xcode 6.3.2 上
回答by Anton Eregin
Following steps resolved issue for me:
以下步骤为我解决了问题:
- Select all your files with "?"
- Right click and select Source Control
- Select Add Selected Files
- Select Commit Selected Files...
- On the popup dialog just drop some comment (no matter what=)
- 用“?”选择所有文件
- 右键单击并选择源代码管理
- 选择添加选定的文件
- 选择提交选定的文件...
- 在弹出对话框中,只需添加一些评论(无论如何=)
回答by Honey
回答by Igor
I suddenly get one my file Unversioned
(with ? mark), but it was old file.
我突然得到一个我的文件Unversioned
(带有?标记),但它是旧文件。
It was .m file. Before problem occurred, I created copy of it, for making new similar class. I renamed a class and add new file to XCode.
它是 .m 文件。在问题发生之前,我创建了它的副本,用于创建新的类似类。我重命名了一个类并将新文件添加到 XCode。
Problem (with old file become Unversioned) was in not renamed comment string at beginning:
问题(旧文件变为未版本化)在开头未重命名的注释字符串中:
//
// MyFirstClass.m
When I renamed it, problem with Unversioned file was resolved.
当我重命名它时,Unversioned 文件的问题解决了。
//
// MySecondClass.m
Hope it'll helpful somebody.
希望它会帮助某人。
P.S. Additionally maybe needed to remove and copy back this files.
PS另外可能需要删除和复制这些文件。