XCode projects without merge pains
XCode’s formats are shitty. They are pain to merge and are impossible to read. YAML is pretty.
Imagine a brave new world with XCode’s nib
s, model files, storyboards,
project files - all in YAML. Thats what that project do!
You can see how pretty it looks on Github in this sample repo.
Installation
Install XcodeYamlizer with:
$ gem install xcode-yamlizer
Usage
Git hooks
The best and recommended way is to install pre-commit
and post-merge
hook.
You can do that from your project’s working directory:
$ xcode-yamlize install
Then, before commit, pre-commit
hook will:
- find all obscure
.xib
s,.xcdatamodel
s, project files, etc. - create appropriate YAML files with the same name +
.yaml
extension - add them to commit (if necessary)
- add all obscure files to
.gitignore
(if necessary) - remove all obscure files from git (if necessary) (but will leave them be in file system)
After merge, post-merge
hook will:
- copy all obscure files to the same name +
~
postfix - overrite all obscure files from the version controlled
yaml
es.
Standalone
$ xcode-yamlizer
options:
-input (-i) convert file (autodetects direction)
-dir (-d) convert directory (default direction - from XCode to YAML)
-to_xcode direction: from YAML to XCode format
-verbose verbose mode
-help (-h) show help