I believe Git does not do any particular handling on how it *stores *binary
files. A blob is a blob, whether it's text or binary.
However, there are some differences when handling binary files:
- Git avoids doing any
files it considers to be binary during add and commit
- When comparing versions, the actual diff is not printed for binary
files, but the change in size of the file (unless you specify --binary)
- Git does not attempt to auto-merge contents of binary files during
Since the "decision" of whether Git will consider a file binary is made
during these actions, you have to exercise one of them to get the answer.
I'd say the easiest one is to add the file to the index (git add filename),
and then do a git diff --cached
If the file is already in the repository, do git log -p filename to see
what kind of diff is printed.
On Monday, June 25, 2012 10:11:31 PM UTC+2, jjm wrote:
> In the documentation for the *text* attribute, it says "If git decides
> that the content is text...".
> Is there a way, for any given file in the working area and/or index and/or
> repository, to find out what Git's decision is: whether the content of the
> file is text or binary?
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To view this discussion on the web visit
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to
For more options, visit this group at