How to use Git properly with Xcode?

后端 未结 5 709
北恋
北恋 2020-12-07 06:46

I have been an iphone developer for a while, and I have recently been including git in my workflow. I have used git settings found on http://shanesbrain.net/2008/7/9/using-

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 07:08

    Frankly, the existing answers are misleading.

    If you never delete or rename files, then using the merge=union strategy, which just combines the differences in different commits directly, is a good idea.

    However, in the real world, we do need to delete or rename files sometimes. Merging the differences without any modification would make a lot of problems under these situations, and these problems usually lead to the "Workspace Integrity - Couldn't load project" issue, which makes you even not able to run the project.

    The best solution I got so far:

    1) Design the project well and add all the needed files at the beginning, so you would seldom need to change the project.pbxproj.

    2) Make your features tiny. Don't do too many things in a branch.

    3) For any reason, if you need to modify the file structure and get conflicts in project.pbxproj, use your favorite text editor to solve them manually. As you make your tasks tiny, the conflicts might be easy to solve.

提交回复
热议问题