xcode – Git,XIBs,合并

前端之家收集整理的这篇文章主要介绍了xcode – Git,XIBs,合并前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正要在master分支上启动一个git分支,为我的应用程序添加一些功能,这也会涉及到界面的一些补充.

但是,我已经有一个分支用于其他一些功能,这些功能也涉及一些接口添加.

当我完成它们时,我是否能够将这些分支合并为主?是否有一些好的做法可能会以某种方式构建xib文件,以便以后合并?

解决方法

What if I,for example,have a tab view with three tabs in one branch,and a tab view with three tabs in the other,and two of the tabs are the same,and one is not,will i get a four-tabbed tab view after the merge

如果修改的行(参见选项卡定义)相同,则很可能会有a conflict.
只有在手动合并解析期间,您错误地保留了额外的选项卡定义时,才会有4个选项卡.

有关合并解决方案的精彩文章,请参阅Painless Merge Conflict Resolution in Git.

话虽如此,特别是xibs,它的介绍似乎很好:

As of Interface Builder version 3,a new file format (with extension .xib) has been added,which is functionally identical to .nib,except it is stored in a flat file,making it more suitable for storage in revision control systems and processing by tools such as diff.

this thread总结了实际感受:

How is Git able to merge changes to XIBs?
The structure of an XIB isn’t linear; there’s no guarantee that you can just swap out portions of an XIB and wind up with a usable XIB.
Unless Git has an understanding of XIBs near Apple’s,I don’t see how merging could be
guaranteed to work.

在发生冲突的情况下添加合并解决方案之前,这将为您留下额外的步骤,在XCode4编辑器中打开修改后的.xib文件,并检查一切是否仍然良好.

视觉检查完成后,record the merge resolution through rerere,将来have potentially automatic resolution.

原文链接:https://www.f2er.com/iOS/333810.html

猜你在找的iOS相关文章