1GIT-HASH-OBJECT(1)                Git Manual                GIT-HASH-OBJECT(1)
2
3
4

NAME

6       git-hash-object - Compute object ID and optionally creates a blob from
7       a file
8

SYNOPSIS

10       git hash-object [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin [--literally]] [--] <file>...
11       git hash-object [-t <type>] [-w] --stdin-paths [--no-filters]
12
13

DESCRIPTION

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

OPTIONS

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 the standard input, one per line, instead of
34           from the command-line.
35
36       --path
37           Hash object as it were located at the given path. The location of
38           file does not directly influence on the hash value, but path is
39           used to determine what Git filters should be applied to the object
40           before it can be placed to the object database, and, as result of
41           applying filters, the actual blob put into the object database may
42           differ from the given file. This option is mainly useful for
43           hashing temporary files located outside of the working directory or
44           files read from stdin.
45
46       --no-filters
47           Hash the contents as is, ignoring any input filter that would have
48           been chosen by the attributes mechanism, including the end-of-line
49           conversion. If the file is read from standard input then this is
50           always implied, unless the --path option is given.
51
52       --literally
53           Allow --stdin to hash any garbage into a loose object which might
54           not otherwise pass standard object parsing or git-fsck checks.
55           Useful for stress-testing Git itself or reproducing characteristics
56           of corrupt or bogus objects encountered in the wild.
57

GIT

59       Part of the git(1) suite
60
61
62
63Git 2.21.0                        02/24/2019                GIT-HASH-OBJECT(1)
Impressum