Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Git Version Control Cookbook
  • Toc
  • feedback
Git Version Control Cookbook

Git Version Control Cookbook

By : Olsson, Voss
4 (3)
close
Git Version Control Cookbook

Git Version Control Cookbook

4 (3)
By: Olsson, Voss

Overview of this book

This practical guide contains a wide variety of recipes, taking you through all the topics you need to know about to fully utilize the most advanced features of the Git system. If you are a software developer or a build and release engineer who uses Git in your daily work and want to take your Git knowledge to the next level, then this book is for you. To understand and follow the recipes included in this book, basic knowledge of Git command-line code is mandatory.
Table of Contents (14 chapters)
close
13
Index

Metadata diff of binary files

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.

Getting ready

We'll use the same repository as we did in the last example and either re-clone it or checkout the exif branch:

$ git clone https://github.com/dvaske/attributes_example.git
$ cd attributes_example
$ git checkout exif

How to do it...

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 .gitattributes:

*.jpg diff=exif-diff

This only tells Git that JPG files should use the exif-diff filter; we still need to set it...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete