truebit / xUnique

merge Xcode project file is so easy
https://fclef.wordpress.com
Other
1.5k stars 117 forks source link

Should we use xUnique every time before anybody committing anything? #36

Closed huangwei4478 closed 8 years ago

huangwei4478 commented 8 years ago

Hi, truebit:

thanks for your great tool, it's a huge life-saver!

But I encountered an issue relating the use of xUnique: I once used xUnique from the command line to help fix the duplicate file references in project.pbxproj after git's auto-merging. It worked well and our team just went ahead and leaved xUnique alone, committing as before without setting xUnique a pre-commit hook of git.

Few days later me and my college wanted to merge commits, then fatal error occurred: There were still quite a lot of conflicts. After combining both commits the file is completely 'not readable by xcode'. I checked this merged project.pbxproj with bettercompare and found out that the whole structure of this project file had been damaged.

So it comes up an issue to me: Do we have to use xUnique every time before anybody committing anything just to stay in sync? Otherwise the whole project file may be damaged due to the inconsistency of inner file layout or something?

Much appreciated.

hw

truebit commented 8 years ago

Do we have to use xUnique every time before anybody committing anything just to stay in sync?

Yes. If one used Xunqiue, all project members must use it. because xUnique changed all UUID of the project file

huangwei4478 commented 8 years ago

wow, thanks for your swift reply!

Besides every project member should use xUnique, my major concern is should every member use xUnique to cope with the project file before every commit? It seems like if one guy in our team miss one shot of xUnique then the whole team would suffer the project.pbxproj file structure damages catastrophe.

truebit commented 8 years ago

yes, it's better to run xunique after every commit. you could trigger xunique only when project file changes. So I suggested using a git commit hook in README

huangwei4478 commented 8 years ago

Well understood.