'\" t .\" Title: git-cat-file .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 03/19/2016 .\" Manual: Git Manual .\" Source: Git 1.7.10.4 .\" Language: English .\" .TH "GIT\-CAT\-FILE" "1" "03/19/2016" "Git 1\&.7\&.10\&.4" "Git Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" git-cat-file \- Provide content or type and size information for repository objects .SH "SYNOPSIS" .sp .nf \fIgit cat\-file\fR (\-t | \-s | \-e | \-p | | \-\-textconv ) \fIgit cat\-file\fR (\-\-batch | \-\-batch\-check) < .fi .sp .SH "DESCRIPTION" .sp In its first form, the command provides the content or the type of an object in the repository\&. The type is required unless \fI\-t\fR or \fI\-p\fR is used to find the object type, or \fI\-s\fR is used to find the object size, or \fI\-\-textconv\fR is used (which implies type "blob")\&. .sp In the second form, a list of objects (separated by linefeeds) is provided on stdin, and the SHA1, type, and size of each object is printed on stdout\&. .SH "OPTIONS" .PP .RS 4 The name of the object to show\&. For a more complete list of ways to spell object names, see the "SPECIFYING REVISIONS" section in \fBgitrevisions\fR(7)\&. .RE .PP \-t .RS 4 Instead of the content, show the object type identified by \&. .RE .PP \-s .RS 4 Instead of the content, show the object size identified by \&. .RE .PP \-e .RS 4 Suppress all output; instead exit with zero status if exists and is a valid object\&. .RE .PP \-p .RS 4 Pretty\-print the contents of based on its type\&. .RE .PP .RS 4 Typically this matches the real type of but asking for a type that can trivially be dereferenced from the given is also permitted\&. An example is to ask for a "tree" with being a commit object that contains it, or to ask for a "blob" with being a tag object that points at it\&. .RE .PP \-\-textconv .RS 4 Show the content as transformed by a textconv filter\&. In this case, has be of the form :, or : in order to apply the filter to the content recorded in the index at \&. .RE .PP \-\-batch .RS 4 Print the SHA1, type, size, and contents of each object provided on stdin\&. May not be combined with any other options or arguments\&. .RE .PP \-\-batch\-check .RS 4 Print the SHA1, type, and size of each object provided on stdin\&. May not be combined with any other options or arguments\&. .RE .SH "OUTPUT" .sp If \fI\-t\fR is specified, one of the \&. .sp If \fI\-s\fR is specified, the size of the in bytes\&. .sp If \fI\-e\fR is specified, no output\&. .sp If \fI\-p\fR is specified, the contents of are pretty\-printed\&. .sp If is specified, the raw (though uncompressed) contents of the will be returned\&. .sp If \fI\-\-batch\fR is specified, output of the following form is printed for each object specified on stdin: .sp .if n \{\ .RS 4 .\} .nf SP SP LF LF .fi .if n \{\ .RE .\} .sp .sp If \fI\-\-batch\-check\fR is specified, output of the following form is printed for each object specified on stdin: .sp .if n \{\ .RS 4 .\} .nf SP SP LF .fi .if n \{\ .RE .\} .sp .sp For both \fI\-\-batch\fR and \fI\-\-batch\-check\fR, output of the following form is printed for each object specified on stdin that does not exist in the repository: .sp .if n \{\ .RS 4 .\} .nf SP missing LF .fi .if n \{\ .RE .\} .sp .SH "GIT" .sp Part of the \fBgit\fR(1) suite