small medium large xlarge

12 Jan 2012, 20:13
Rick Silva (1 post)

When I do a “git log” it shows the SHAs for that file:

git log filename.txt

a1aa11a - fred - added a section

f2ff22f - sue - changed comments

j8jj88j - tom - removed a section

m4mm44m - dick - fixed header

q5qq55q - harry - new file

But doing a “git diff” for other SHAs not listed shows differences in the file. For example, “git diff v9vv99v z8zz88z filename.txt” shows differences in the file, even though v9vv99v and z8zz88z weren’t shown in the “git log” for this file.

I found this out by accident by doing a “git diff” using SHAs that are shown in the “git log” results for another file.

Any idea what is going on there?

You must be logged in to comment