Giter Club home page Giter Club logo

kintsugi's Introduction

Kintsugi Logo

Kintsugi Ruby Style Guide

What is this?

One of the frustrations of working with Xcode together with Git is resolving conflicts in Xcode project files, i.e. the project.pbxproj file.

Kintsugi sets out to solve this exact problem: Automatically resolving Git merge conflicts occurring in .pbxproj files.

The end goal is for the tool to succeed 99.9% of the time, and let you resolve the real conflicts in a convenient way the rest of the time.

Kintsugi (金継ぎ) is the art of repairing broken pottery by mending it with gold. Wikipedia

How?

Kintsugi understands the changes you've made to the .pbxproj file, so it simply resets the conflicts and re-applies those changes to it.

From a technical perspective, Kintsugi heavily relies on Xcodeproj. It uses its diff capability to extract the changes, and uses its project files editing capabilities to apply the changes.

Installing Kintsugi

$ gem install kintsugi

If you prefer to use bundler, add the following line to your Gemfile:

gem 'kintsugi', require: false

Usage

When there's a .pbxproj file with Git conflicts, and a 3-way merge is possible, run kintsugi <path_to_pbxproj_file>.

And see the magic happen! ✨

Git merge driver

You can setup Kintsugi to automatically resolve conflicts that occur in pbxproj files when such conflicts occur.

Automatic install

Run kintsugi install-driver. This will install Kintsugi as a merge driver globally. Note that Kintsugi needs to be in your PATH.

❗ Do not install with bundler because the installation might succeed even if Kintsugi is not in PATH.

Manual install

  • Add Kintsugi as driver to Git config file by running the following:
git config merge.kintsugi.name "Kintsugi driver" # Or any other name you prefer
git config merge.kintsugi.driver "<path_to_kintsugi> driver %O %A %B %P"

Run git config with --global to add this to the global config file.

  • Add the following line to the .gitattributes file at the root of the repository:

*.pbxproj merge=kintsugi

This will instruct Git to use Kintsugi as a merge driver for .pbxproj files.

See the official docs if you want to set this globally.

Contribution

See our Contribution guidelines.

Alternatives

All of the alternatives below allow you to generate your Xcode projects based on a spec or manifest. You commit these files to git, and can even remove the .xcodeproj files from git.

Copyright

Copyright (c) 2021 Lightricks. See LICENSE for details.

kintsugi's People

Contributors

ashdnazg avatar barakwei avatar barakyoresh avatar byohay avatar galberezansky avatar natanrolnik avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.