Git versioning data: custom diff for specific files

So, I want to explore the applicability of git to versioning specific data structures of a binary or text tree. The thing is, I want the diff logic to be fully customizable for the data structure template.

Assuming this file is a specific json object, I want a custom diff for json files so if I have version A like this:

{ a: 'yes' , b: { 'X': 'unavailable' , 'Y': ready } }

and I apply the following change:

{ a: 'yes' , b: { 'X': 'unavailable' , 'Y': done } }

so my diff will be wise to notice that only element 1 has changed . By default diff, if someone made changes, say, in the key a, item [0], then this creates a conflict that needs to be combined manually. Custom diff will aim to customize diff logic for certain types of files and content.

Maybe something a little different for binaries.

The purpose of this question is to see if:

  • paths in current git to support this setting
  • git projects or development branches to support this setting
  • some other tool more suitable for this

thank!

, , , , . , , , .

+5
1

( "Diffing Binary Files" ), Word. , .

, .

+2

All Articles