Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NIB files and Version Control: Using branches

Is there a good way to use NIB (or XIB) files when working with branches?

When I try to do this, most of the time the merging of topic branches does not really work. Autogenerated IDs change very frequently and all over the place, which provokes conflicts. The changes in the XIB are not human-parsable, so the manual merging does not work, either.

How do you deal with this issue? Is there some non-obvious technique, or do you avoid branches that contain Cocoa UI elements? Should one completely exchange/replace XIB files using a different name, if they are changed in a branch, as a workaround?

like image 282
febeling Avatar asked Mar 15 '12 15:03

febeling


1 Answers

I haven't seen a solution I'm satisfied with yet. Short lived branches and focused nibs containing a minimum number of objects help avoid conflicts but that's not a full solution. The best I can offer is to try to enforce a clear separation of concerns in your nib contents so that unrelated edits don't edit the same file. I end up loading a number of view via UINib as a result but haven't found that to be a problem and it makes reuse of views across the app easier too.

like image 133
Jonah Avatar answered Oct 17 '22 05:10

Jonah