但是,我已经有一个分支用于其他一些功能,这些功能也涉及一些接口添加.
当我完成它们时,我是否能够将这些分支合并为主?是否有一些好的做法可能会以某种方式构建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
@H_404_13@如果修改的行(参见选项卡定义)相同,则很可能会有a conflict.
只有在手动合并解析期间,您错误地保留了额外的选项卡定义时,才会有4个选项卡.有关合并解决方案的精彩文章,请参阅Painless Merge Conflict Resolution in Git.
话虽如此,特别是xibs,它的介绍似乎很好:
As of Interface Builder version 3,a new file format (with extension
@H_404_13@.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?
@H_404_13@
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.