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.

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...