xcode – Git,XIBs,合并

xcode – Git,XIBs,合并,第1张

概述我正要在master分支上启动一个git分支,为我的应用程序添加一些功能,这也会涉及到界面的一些补充. 但是,我已经有一个分支用于其他一些功能,这些功能也涉及一些接口添加. 当我完成它们时,我是否能够将这些分支合并为主?是否有一些好的做法可能会以某种方式构建xib文件,以便以后合并? What if I, for example, have a tab view with three tabs i 我正要在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.

总结

以上是内存溢出为你收集整理的xcode – Git,XIBs,合并全部内容,希望文章能够帮你解决xcode – Git,XIBs,合并所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1103799.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-28
下一篇2022-05-28

发表评论

登录后才能评论

评论列表(0条)

    保存