blob: 02c1f126855b24dec121fb49bf920ad14af0b0b8 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-hash-object(1)
2==================
3
4NAME
5----
Junio C Hamano7c73c662007-01-19 00:37:506git-hash-object - Compute object ID and optionally creates a blob from a file
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
Junio C Hamano5cf43ca2008-08-20 09:14:1411[verse]
12'git hash-object' [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin] [--] <file>...
Junio C Hamano118896b2010-03-07 09:10:1213'git hash-object' [-t <type>] [-w] --stdin-paths [--no-filters] < <list-of-paths>
Junio C Hamano1a4e8412005-12-27 08:17:2314
15DESCRIPTION
16-----------
17Computes the object ID value for an object with specified type
18with the contents of the named file (which can be outside of the
19work tree), and optionally writes the resulting object into the
20object database. Reports its object ID to its standard output.
Junio C Hamano1aa40d22010-01-21 17:46:4321This is used by 'git cvsimport' to update the index
Junio C Hamano1a4e8412005-12-27 08:17:2322without modifying files in the work tree. When <type> is not
Junio C Hamanoa77a5132007-06-08 16:13:4423specified, it defaults to "blob".
Junio C Hamano1a4e8412005-12-27 08:17:2324
25OPTIONS
26-------
27
28-t <type>::
29Specify the type (default: "blob").
30
31-w::
32Actually write the object into the object database.
33
34--stdin::
35Read the object from standard input instead of from a file.
36
Junio C Hamanodfccbb02008-05-26 01:16:1437--stdin-paths::
38Read file names from stdin instead of from the command-line.
39
Junio C Hamano5cf43ca2008-08-20 09:14:1440--path::
41Hash object as it were located at the given path. The location of
42file does not directly influence on the hash value, but path is
Junio C Hamano076ffcc2013-02-06 05:13:2143used to determine what Git filters should be applied to the object
Junio C Hamano5cf43ca2008-08-20 09:14:1444before it can be placed to the object database, and, as result of
45applying filters, the actual blob put into the object database may
46differ from the given file. This option is mainly useful for hashing
47temporary files located outside of the working directory or files
48read from stdin.
49
50--no-filters::
51Hash the contents as is, ignoring any input filter that would
Junio C Hamano619596a2010-08-18 22:15:3552have been chosen by the attributes mechanism, including the end-of-line
Junio C Hamano5cf43ca2008-08-20 09:14:1453conversion. If the file is read from standard input then this
54is always implied, unless the --path option is given.
55
Junio C Hamano1a4e8412005-12-27 08:17:2356GIT
57---
Junio C Hamanof7c042d2008-06-06 22:50:5358Part of the linkgit:git[1] suite