<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<article lang="en" id="git-hash-object(1)">
<articleinfo>
    <title>git-hash-object(1)</title>
        <indexterm>
                <primary>git-hash-object(1)</primary>
        </indexterm>
</articleinfo>
<simplesect id="_name">
<title>NAME</title>
<simpara>git-hash-object - Compute object ID and optionally creates a blob from a file</simpara>
</simplesect>
<simplesect id="_synopsis">
<title>SYNOPSIS</title>
<blockquote>
<literallayout><emphasis>git hash-object</emphasis> [-t &lt;type&gt;] [-w] [--path=&lt;file&gt;|--no-filters] [--stdin] [--] &lt;file&gt;&#8230;
<emphasis>git hash-object</emphasis> [-t &lt;type&gt;] [-w] --stdin-paths &lt; &lt;list-of-paths&gt;</literallayout>
</blockquote>
</simplesect>
<simplesect id="_description">
<title>DESCRIPTION</title>
<simpara>Computes the object ID value for an object with specified type
with the contents of the named file (which can be outside of the
work tree), and optionally writes the resulting object into the
object database.  Reports its object ID to its standard output.
This is used by <emphasis>git-cvsimport</emphasis> to update the index
without modifying files in the work tree.  When &lt;type&gt; is not
specified, it defaults to "blob".</simpara>
</simplesect>
<simplesect id="_options">
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>
-t &lt;type&gt;
</term>
<listitem>
<simpara>
        Specify the type (default: "blob").
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-w
</term>
<listitem>
<simpara>
        Actually write the object into the object database.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--stdin
</term>
<listitem>
<simpara>
        Read the object from standard input instead of from a file.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--stdin-paths
</term>
<listitem>
<simpara>
        Read file names from stdin instead of from the command-line.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--path
</term>
<listitem>
<simpara>
        Hash object as it were located at the given path. The location of
        file does not directly influence on the hash value, but path is
        used to determine what git filters should be applied to the object
        before it can be placed to the object database, and, as result of
        applying filters, the actual blob put into the object database may
        differ from the given file. This option is mainly useful for hashing
        temporary files located outside of the working directory or files
        read from stdin.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--no-filters
</term>
<listitem>
<simpara>
        Hash the contents as is, ignoring any input filter that would
        have been chosen by the attributes mechanism, including crlf
        conversion. If the file is read from standard input then this
        is always implied, unless the --path option is given.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="_author">
<title>Author</title>
<simpara>Written by Junio C Hamano &lt;<ulink url="mailto:gitster@pobox.com">gitster@pobox.com</ulink>&gt;</simpara>
</simplesect>
<simplesect id="_documentation">
<title>Documentation</title>
<simpara>Documentation by David Greaves, Junio C Hamano and the git-list &lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>&gt;.</simpara>
</simplesect>
<simplesect id="_git">
<title>GIT</title>
<simpara>Part of the <xref linkend="git(1)"/> suite</simpara>
</simplesect>
</article>
