1git-cat-file(1) 2=============== 3 4NAME 5---- 6git-cat-file - Provide content or type/size information for repository objects 7 8 9SYNOPSIS 10-------- 11'git-cat-file' [-t | -s | -e | -p | <type>] <object> 12'git-cat-file' --batch-check < <list-of-objects> 13 14DESCRIPTION 15----------- 16In the first form, provides content or type of objects in the repository. The 17type is required unless '-t' or '-p' is used to find the object type, or '-s' 18is used to find the object size. 19 20In the second form, a list of object (separated by LFs) is provided on stdin, 21and the SHA1, type, and size of each object is printed on stdout. 22 23OPTIONS 24------- 25<object>:: 26 The name of the object to show. 27 For a more complete list of ways to spell object names, see 28 "SPECIFYING REVISIONS" section in linkgit:git-rev-parse[1]. 29 30-t:: 31 Instead of the content, show the object type identified by 32 <object>. 33 34-s:: 35 Instead of the content, show the object size identified by 36 <object>. 37 38-e:: 39 Suppress all output; instead exit with zero status if <object> 40 exists and is a valid object. 41 42-p:: 43 Pretty-print the contents of <object> based on its type. 44 45<type>:: 46 Typically this matches the real type of <object> but asking 47 for a type that can trivially be dereferenced from the given 48 <object> is also permitted. An example is to ask for a 49 "tree" with <object> being a commit object that contains it, 50 or to ask for a "blob" with <object> being a tag object that 51 points at it. 52 53--batch-check:: 54 Print the SHA1, type, and size of each object provided on stdin. May not be 55 combined with any other options or arguments. 56 57OUTPUT 58------ 59If '-t' is specified, one of the <type>. 60 61If '-s' is specified, the size of the <object> in bytes. 62 63If '-e' is specified, no output. 64 65If '-p' is specified, the contents of <object> are pretty-printed. 66 67If <type> is specified, the raw (though uncompressed) contents of the <object> 68will be returned. 69 70If '--batch-check' is specified, output of the following form is printed for 71each object specified fon stdin: 72 73------------ 74<sha1> SP <type> SP <size> LF 75------------ 76 77Additionally, output of the following form is printed for each object specified 78on stdin that does not exist in the repository: 79 80------------ 81<object> SP missing LF 82------------ 83 84Author 85------ 86Written by Linus Torvalds <torvalds@osdl.org> 87 88Documentation 89-------------- 90Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>. 91 92GIT 93--- 94Part of the linkgit:git[7] suite