From: "Dale R. Worley" <>
"Philip Oakley" <> writes:
You may find that there are 'end of line' differences between the
commits in the server, and the commits you have locally, which after
eol conversion, look identical, but the different eol strings makes
the sha1's different.

Yes, it's usually the case when files look the same but the merge
program doesn't like them that there is an end-of-line problem. Worse,
the *same file contents* can mean logically different things if one
version of the file is interpreted in one way in regard to line endings
and the other version is interpreted in a different way.

To start diagnosing the problem, the first thing is to extract the
hashes of the files as Git has them recorded. Another is to get Git to
output the two files and you save them into two files.  Then use some
stupid program like cmp to check whether the files are *actually*
byte-by-byte identical.  (When you're having problems like this, avoid
using any "intelligent" file comparison program, because such programs
often apply their own interpretation to the files they handle -- 99% of
the time, it helps the user, but this is one of the 1% situations.)

Another thing to do is check out one of the commits, then manually run a
checksum program (e.g., sha1sum) on the file in question.  Then check
out the other commit, and manually run the checksum. Are the checksums
the same?  Do they agree with the checksums Git has recorded for the
files in the commit objects?


Hi Dale,
I think in this case the byte by byte check was identical,including line endings, which made it all the more awkward to sort out. (detecting file mode changes!)

It looks like the SO gets linked a lot, but only after the source of 'problem' has been determined.

It does feel like another of those Git Gotcha's [1], where the key data is missing for the 'normal' user's "status" commands.

I may try to repeat the problem scenario (as I perceive it) and see what the 'right' commands would be to determine the fault.


[1] Gotcha: a sudden unforeseen problem.
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to