Binary files can be hard to diff, depending on the type of the file. Often, the only option is to load two instances of the program to show the files and check the differences visually. In this recipe we'll see how we can use EXIF metadata to diff images in the repository.
We'll use the same repository as we did in the last example and either re-clone it or checkout the
$ git clone https://github.com/dvaske/attributes_example.git $ cd attributes_example $ git checkout exif
In order to use the EXIF data while diffing binary files, we need to set up a filter to tell Git what to do when a file of
*.jpg is to be diffed. EXIF data is metadata embedded in images and is often used by digital cameras to record timestamps, the size of an image, and so on.
We'll write the following line to