ios - 为什么 .pbxproj 文件在版本控制系统中被视为二进制文件?

标签 ios xcode git macos cvs

很少有地方提到 .pbxproj 文件应该作为二进制文件在 cvs 或 git 中提交/导入。它看起来像文本格式的脚本文件。该建议应将其视为二进制文件的原因是什么?

最佳答案

作为mentioned here , pbxproj 不是真正可 merge 的,它是一个作为 JSON 管理的复杂属性列表。

通常的设置在 .gitattributes 中:

*.pbxproj -crlf -diff -merge

作为explained here :

This prevents Git from trying to fix newlines, show it in diffs, and excludes it from merges.

另一种方法是:

*.pbxproj binary merge=union

作为documented her e, 这个效果不好。

The problem was that braces would become out of place on a regular basis, which made the files unreadable. It is true that tho does work most of the time - but fails maybe 1 out of 4 times.

关于ios - 为什么 .pbxproj 文件在版本控制系统中被视为二进制文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36833172/

相关文章:

ios - 如何摆脱 "Build input file cannot be found"和 "No such file or directory"?

git - git创建分支时出错

ios - 如何实现自定义演示者行?

ios - 使用 three20 TTButtonBar, iOS 复制 Facebook

ios - 在 iOS 应用中使用 Office365 SDK 进行静默登录

iphone - Xcode 5 两次显示同一设备

git - 将 Git 分支推送到远程而不检查分支

git - 如何使用来自私有(private) git 存储库的应用程序代码构建 docker 镜像?

ios - 录制视频时在前后摄像头之间切换

iphone - stretchableImageWithLeftCapWidth 使图像模糊