Why does git add&remove the Storyboard section repeatedly?

后端 未结 2 1370
小蘑菇
小蘑菇 2021-02-05 08:08

When saving the storyboard and committing the changes to git, the chances are good that the whole section will be removed from or added to source co

2条回答
  •  生来不讨喜
    2021-02-05 08:39

    In my experience the removal only happens if you open the storyboard and have class existence related errors. An example of this is opening the storyboard while a merge conflict is not yet resolved. One or more classes might not be parse-able. In this case Interface builder seems to be removing the entire section and not only the offending class.

    For me it is easily fixed by opening the storyboard again after the patch is ready in case i see the removal. If all problems are resolved, the section is regenerated. If it isn't, it means I have a problem with project settings and i shouldn't be committing anyways.

提交回复
热议问题