Is it possible to diff lfs files in git?

0

Issue

When I look at the diff of an lfs file, I just see the oid and size difference. Is there a way to easily diff the actual file contents?

Solution

From this post by bk2204:

Another option if you want to have diffs is to run git config diff.lfs.textconv cat, which will have any files with the diff=lfs attribute automatically rendered through Git to show the LFS file instead of the pointer.


Sourcetree GUI example:

My diff looked like this:

pre-image

After running the command, it looks like this:

post-image

(You might need to re-open Sourcetree for the changes to be applied.)

Answered By – sonny

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More