2

I need version control on my own XML files and I cannot use Git predefined diff tools as each node should be diffed in a different way, e.g. child order is relevant for some nodes only.

Therefore, I would like to develop a diff tool to be used in the full Git process (diff and merge). Can I use my custom diff tool for diff and merge? If yes: how? And what are the requirements to have my custom diff tool working correctly in Git?

Moreover, is there any way to have this working also on GitHub for Desktop?

Thanks.

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
smn.tino
  • 2,272
  • 4
  • 32
  • 41
  • 1
    http://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#Binary-Files and yes, your custom diff-tool will work with any Git-client (AFAIK) – Lazy Badger Oct 17 '15 at 19:19
  • thanks, I have also found a clear explanation on how to do that here: http://stackoverflow.com/questions/255202/how-do-i-view-git-diff-output-with-a-visual-diff-program/949242#949242 However, I would use my own custom diff tool and I need to know which kind of interface Git expects from the tool. I understood I can use a .sh in .gitconfig for calling my diff tool properly, but how should I generate the output to Git? – smn.tino Oct 18 '15 at 21:56
  • http://git-scm.com/docs/git-difftool (note `-x` option) may be better for you in case of fresh (2.5+) Git – Lazy Badger Oct 19 '15 at 05:05
  • @LazyBadger: you could make the `-x` option an answer. – leftaroundabout Jun 30 '16 at 13:11

0 Answers0