truebit / xUnique

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

Only one person can commit project.pbxproj? #26

Closed dengjunwen closed 8 years ago

dengjunwen commented 8 years ago

I used it for my project. I found out that only one person can commit project.pbxproj, but to avoid conflict, other people can only commit .m and .h files . Is that true?

truebit commented 8 years ago

No, all the project members could commit using xUnique. The first statement in README have clarified this already:

xUnique, is a pure Python script to regenerate project.pbxproj, a.k.a the Xcode project file, and make it unique and same on any machine.

But if you use xUnique in your team, all of your project members must use xUnique to avoid confliction.

dengjunwen commented 8 years ago

I follow the step of Xcode "build post-action" correctly, but it was useless when I follow your step 7. So I used /usr/local/bin/xunique -u -s "${PROJECT_FILE_PATH}/project.pbxproj" to instead of your command. My command worked that it could create a new project.pbxproj. While it couldn't avoid confliction when all of my project members used xUnique.

problem description: I created one file that called add3.m. The Other people created one file that called add4.m. He built his project and generated a new project.pbxproj. He commited all of this file to svn. When I updated the project, I found it conficted. Here is the infomation of project.pbxproj conflict.

<<<<<<< .mine D319146B28F22877CA52D1990AD54F8D /* add3.m _/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = add3.m; sourceTree = ""; };

    B6C7C20E8DE96288E54E462CADD63457 /_ add4.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = add4.m; sourceTree = "<group>"; };

.r3100

dengjunwen commented 8 years ago

你好: 非常感谢你的解答。 我刚刚突然想到了怎么使用xUnique,不知道对不对。 每次上传文件前只更新除project.pbxproj以外的文件,在本地工程中选择Add Files to "myproject" 添加新更新的文件到本地工程,然后build本地工程,最后上传所有文件。 这样就不会造成project.pbxproj冲突。(多人开发模式) 请你看下这个过程对不对。谢谢!

truebit commented 8 years ago

I understand what you mean now. Firstly, you should know what causes a conflict: when two users modified the same line(area) in the same file, svn/git would throw a conflict. that is quite right and normal in your case. You should know in first place that xUnique cannot annihilate conflict, what it does is trying to make merging more easily and cleanly.

truebit commented 8 years ago

不用你说的那么麻烦,因为你举的例子里的冲突是不可避免的。你这种情况之前我提过可以通过.gitattributes来处理,不过会引入新的问题,我把那个配置说明从README删除了

dengjunwen commented 8 years ago

非常感谢你的回答。我想我应该知道怎么做了。

在 2015年12月2日,下午12:19,Sean Wang notifications@github.com 写道:

不用你说的那么麻烦,因为你举的例子里的冲突是不可避免的。你这种情况之前我提过可以通过.gitattributes来处理,不过会引入新的问题 https://github.com/truebit/xUnique/issues/12,我把那个配置说明从README删除了

— Reply to this email directly or view it on GitHub https://github.com/truebit/xUnique/issues/26#issuecomment-161176783.

dengjunwen commented 8 years ago

这个项目很好用。已经加星了!

在 2015年12月2日,下午12:19,Sean Wang notifications@github.com 写道:

不用你说的那么麻烦,因为你举的例子里的冲突是不可避免的。你这种情况之前我提过可以通过.gitattributes来处理,不过会引入新的问题 https://github.com/truebit/xUnique/issues/12,我把那个配置说明从README删除了

— Reply to this email directly or view it on GitHub https://github.com/truebit/xUnique/issues/26#issuecomment-161176783.

truebit commented 8 years ago

Glad it helps😄