是否应该将 XCSharedData 签入 Git Repo 以用于 Xcode 项目?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/53034303/
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
Should XCSharedData be checked into Git Repo for Xcode project?
提问by Esko918
I just made some changes and I see a pending file that has not been added to the repo. The filenames path is */xcshareddata/IDEWorkspaceChecks.plist. Can someone explain the reason for this file and why or why not it needs to be added to the repo?
我刚刚做了一些更改,我看到一个未添加到 repo 的待处理文件。文件名路径是 */xcshareddata/IDEWorkspaceChecks.plist。有人可以解释这个文件的原因以及为什么或为什么不需要将它添加到 repo 中吗?
回答by C?ur
The files in xcshareddata/
should be added to the repo (but not the ones in xcuserdata/
):
中的文件xcshareddata/
应该添加到 repo 中(但不是 中的文件xcuserdata/
):
Xcode 9.3 adds a new IDEWorkspaceChecks.plist file to a workspace's shared data, to store the state of necessary workspace checks. Committing this file to source control will prevent unnecessary rerunning of those checks for each user opening the workspace. (37293167)
Xcode 9.3 向工作区的共享数据添加了一个新的 IDEWorkspaceChecks.plist 文件,以存储必要的工作区检查的状态。将此文件提交到源代码管理将防止为每个打开工作区的用户不必要地重新运行这些检查。(37293167)
Regarding Xcode 9 and newer, the only line you really need in your .gitignore is:
关于Xcode 9 和更新版本,您在 .gitignore 中真正需要的唯一一行是:
xcuserdata/
Nothing else for Xcode 9+. Whatever other lines you have in your .gitignore should be only added for your specific needs, not because you found an obsolete .gitignore sample on the internet. :)
Xcode 9+ 没有别的了。.gitignore 中的任何其他行都应该仅根据您的特定需求添加,而不是因为您在互联网上找到了过时的 .gitignore 示例。:)