1GIT-HASH-OBJECT(1) Git Manual GIT-HASH-OBJECT(1)
2
3
4
6 git-hash-object - Compute object ID and optionally creates a blob from
7 a file
8
10 git hash-object [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] <file>...
11 git hash-object [-t <type>] [-w] --stdin-paths [--no-filters] < <list-of-paths>
12
13
15 Computes the object ID value for an object with specified type with the
16 contents of the named file (which can be outside of the work tree), and
17 optionally writes the resulting object into the object database.
18 Reports its object ID to its standard output. This is used by git
19 cvsimport to update the index without modifying files in the work tree.
20 When <type> is not specified, it defaults to "blob".
21
23 -t <type>
24 Specify the type (default: "blob").
25
26 -w
27 Actually write the object into the object database.
28
29 --stdin
30 Read the object from standard input instead of from a file.
31
32 --stdin-paths
33 Read file names from stdin instead of from the command-line.
34
35 --path
36 Hash object as it were located at the given path. The location of
37 file does not directly influence on the hash value, but path is
38 used to determine what git filters should be applied to the object
39 before it can be placed to the object database, and, as result of
40 applying filters, the actual blob put into the object database may
41 differ from the given file. This option is mainly useful for
42 hashing temporary files located outside of the working directory or
43 files read from stdin.
44
45 --no-filters
46 Hash the contents as is, ignoring any input filter that would have
47 been chosen by the attributes mechanism, including crlf conversion.
48 If the file is read from standard input then this is always
49 implied, unless the --path option is given.
50
52 Written by Junio C Hamano <gitster@pobox.com[1]>
53
55 Documentation by David Greaves, Junio C Hamano and the git-list
56 <git@vger.kernel.org[2]>.
57
59 Part of the git(1) suite
60
62 1. gitster@pobox.com
63 mailto:gitster@pobox.com
64
65 2. git@vger.kernel.org
66 mailto:git@vger.kernel.org
67
68
69
70Git 1.7.1 08/16/2017 GIT-HASH-OBJECT(1)