git-cat-file(1)
===============
NAME
----
git-cat-file - Provide contents or details of repository objects
SYNOPSIS
--------
[verse]
'git cat-file' <type> <object>
'git cat-file' (-e | -p | -t | -s) <object>
'git cat-file' (--textconv | --filters)
[<rev>:<path|tree-ish> | --path=<path|tree-ish> <rev>]
'git cat-file' (--batch | --batch-check | --batch-command) [--batch-all-objects]
[--buffer] [--follow-symlinks] [--unordered]
[--textconv | --filters] [-Z]
DESCRIPTION
-----------
Output the contents or other properties such as size, type or delta
information of one or more objects.
This command can operate in two modes, depending on whether an option
from the `--batch` family is specified.
In non-batch mode, the command provides information on an object
named on the command line.
In batch mode, arguments are read from standard input.
OPTIONS
-------
<object>::
The name of the object to show.
For a more complete list of ways to spell object names, see
the "SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
-t::
Instead of the content, show the object type identified by
`<object>`.
-s::
Instead of the content, show the object size identified by
`<object>`. If used with `--use-mailmap` option, will show
the size of updated object after replacing idents using the
mailmap mechanism.
-e::
Exit with zero status if `<object>` exists and is a valid
object. If `<object>` is of an invalid format, exit with non-zero
status and emit an error on stderr.
-p::
Pretty-print the contents of `<object>` based on its type.
<type>::
Typically this matches the real type of `<object>` but asking
for a type that can trivially be dereferenced from the given
`<object>` is also permitted. An example is to ask for a
"tree" with `<object>` being a commit object that contains it,
or to ask for a "blob" with `<object>` being a tag object that
points at it.
--[no-]mailmap::
--[no-]use-mailmap::
Use mailmap file to map author, committer and tagger names
and email addresses to canonical real names and email addresses.
See linkgit:git-shortlog[1].
--textconv::
Show the content as transformed by a textconv filter. In this case,
`<object>` has to be of the form `<tree-ish>:<path>`, or `:<path>` in
order to apply the filter to the content recorded in the index at
`<path>`.
--filters::
Show the content as converted by the filters configured in
the current working tree for the given `<path>` (i.e. smudge filters,
end-of-line conversion, etc). In this case, `<object>` has to be of
the form `<tree-ish>:<path>`, or `:<path>`.
--filter=<filter-spec>::
--no-filter::
Omit objects from the list of printed objects. This can only be used in
combination with one of the batched modes. Excluded objects that have
been explicitly requested via any of the batch modes that read objects
via standard input (`--batch`, `--batch-check`) will be reported as
"filtered". Excluded objects in `--batch-all-objects` mode will not be
printed at all. The '<filter-spec>' may be one of the following:
+
The form '--filter=blob:none' omits all blobs.
+
The form '--filter=blob:limit=<n>[kmg]' omits blobs of size at least n
bytes or units. n may be zero. The suffixes k, m, and g can be used to name
units in KiB, MiB, or GiB. For example, 'blob:limit=1k' is the same as
'blob:limit=1024'.
+
The form '--filter=object:type=(tag|commit|tree|blob)' omits all objects which
are not of the requested type.
--path=<path>::
For use with `--textconv` or `--filters`, to allow specifying an object
name and a path separately, e.g. when it is difficult to figure out
the revision from which the blob came.
--batch::
--batch=<format>::
Print object information and contents for each object provided
on stdin. May not be combined with any other options or arguments
except `--textconv`, `--filters`, or `--use-mailmap`.
+
--
* When used with `--textconv` or `--filters`, the input lines
must specify the path, separated by