Git and pbxproj

后端 未结 4 725
死守一世寂寞
死守一世寂寞 2020-11-29 21:36

I was looking at an open source Mac application, and they gave some suggested values for .gitignore. They were what I would expect...

However, they also suggested an

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 22:19

    I wrote a python script named xUnique to solve this merge conflicts problem.

    This script do following things:

    • replace all 24 chars UUID to project-wide unique 32 chars MD5 digests, and remove any unused UUIDs(usually caused by careless merge before). This would prevent duplicate UUIDs because different machines/Xcode generate different UUIDs in this file. Xcode does recognize it and the project could be opened. During this process, remove all invalid lines in project file
    • sort the project file. I wrote a python version of sort-Xcode-project-file from Webkit team with more new features:
      • support to sort PBXFileReference and PBXBuildFile sections
      • remove duplicated files/refs
      • avoid creating new file even if no changes made, this makes less commits after using this script

    More details and updates of xUnique, please refer to README

提交回复
热议问题