Merge branch 'fr_v2.39_rnd1' of github.com:jnavila/git
[alt-git.git] / Documentation / git-hash-object.txt
blob472b5bb995be278415daede21a5489ed2d4c01da
1 git-hash-object(1)
2 ==================
4 NAME
5 ----
6 git-hash-object - Compute object ID and optionally creates a blob from a file
9 SYNOPSIS
10 --------
11 [verse]
12 'git hash-object' [-t <type>] [-w] [--path=<file> | --no-filters]
13                 [--stdin [--literally]] [--] <file>...
14 'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters]
16 DESCRIPTION
17 -----------
18 Computes the object ID value for an object with specified type
19 with the contents of the named file (which can be outside of the
20 work tree), and optionally writes the resulting object into the
21 object database.  Reports its object ID to its standard output.
22 When <type> is not specified, it defaults to "blob".
24 OPTIONS
25 -------
27 -t <type>::
28         Specify the type (default: "blob").
30 -w::
31         Actually write the object into the object database.
33 --stdin::
34         Read the object from standard input instead of from a file.
36 --stdin-paths::
37         Read file names from the standard input, one per line, instead
38         of from the command-line.
40 --path::
41         Hash object as it were located at the given path. The location of
42         file does not directly influence on the hash value, but path is
43         used to determine what Git filters should be applied to the object
44         before it can be placed to the object database, and, as result of
45         applying filters, the actual blob put into the object database may
46         differ from the given file. This option is mainly useful for hashing
47         temporary files located outside of the working directory or files
48         read from stdin.
50 --no-filters::
51         Hash the contents as is, ignoring any input filter that would
52         have been chosen by the attributes mechanism, including the end-of-line
53         conversion. If the file is read from standard input then this
54         is always implied, unless the `--path` option is given.
56 --literally::
57         Allow `--stdin` to hash any garbage into a loose object which might not
58         otherwise pass standard object parsing or git-fsck checks. Useful for
59         stress-testing Git itself or reproducing characteristics of corrupt or
60         bogus objects encountered in the wild.
62 GIT
63 ---
64 Part of the linkgit:git[1] suite