LoginSignup
18

More than 5 years have passed since last update.

mergepbxを使ってみる

Posted at

概要

XcodeのプロジェクトをGitで管理する際、複数人で作業をしていると .pbxproj ファイルのコンフリクトに悩まされる。
これを解消するため mergepbx を使って見る。

mergepbx

インストール

$ git clone https://github.com/simonwagner/mergepbx
$ cd mergepbx/
$ ./build.py
$ sudo cp mergepbx /usr/local/bin/

gitconfigに設定を追加

$ vi ~/.gitconfig

以下を追加する。

.gitconfig
# driver for merging Xcode project files
[merge "mergepbx"]
name = XCode project files merger
driver = mergepbx %O %A %B

gitattributesに設定を追加

$ cd ${git_repository_root_dir}
$ vim .gitattributes

以下を追加する。

.gitattributes
*.pbxproj merge=mergepbx

実行

準備が整ってからマージしてみると、あら不思議とコンフリクトしなくなってました。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
18