Path to a log file where the CVS server interface well... logs
various stuff. See linkgit:git-cvsserver[1].
+gitcvs.usecrlfattr
+ If true, the server will look up the `crlf` attribute for
+ files to determine the '-k' modes to use. If `crlf` is set,
+ the '-k' mode will be left blank, so cvs clients will
+ treat it as text. If `crlf` is explicitly unset, the file
+ will be set with '-kb' mode, which supresses any newline munging
+ the client might otherwise do. If `crlf` is not specified,
+ then 'gitcvs.allbinary' is used. See linkgit:gitattribute[5].
+
gitcvs.allbinary::
- If true, all files are sent to the client in mode '-kb'. This
- causes the client to treat all files as binary files which suppresses
- any newline munging it otherwise might do. A work-around for the
- fact that there is no way yet to set single files to mode '-kb'.
+ This is used if 'gitcvs.usecrlfattr' does not resolve
+ the correct '-kb' mode to use. If true, all
+ unresolved files are sent to the client in
+ mode '-kb'. This causes the client to treat them
+ as binary files, which suppresses any newline munging it
+ otherwise might do. Alternatively, if it is set to "guess",
+ then the contents of the file are examined to decide if
+ it is binary, similar to 'core.autocrlf'.
gitcvs.dbname::
Database used by git-cvsserver to cache revision information
linkgit:git-cvsserver[1] for details). Any non-alphabetic
characters will be replaced with underscores.
-All gitcvs variables except for 'gitcvs.allbinary' can also be
-specified as 'gitcvs.<access_method>.<varname>' (where 'access_method'
+All gitcvs variables except for 'gitcvs.usecrlfattr' and
+'gitcvs.allbinary' can also be specified as
+'gitcvs.<access_method>.<varname>' (where 'access_method'
is one of "ext" and "pserver") to make them apply only for the given
access method.
<p>This tutorial explains how to use the "core" git programs to set up and\r
work with a git repository.</p>\r
<p>If you just need to use git as a revision control system you may prefer\r
-to start with <a href="tutorial.html">a tutorial introduction to git</a> or\r
+to start with <a href="gittutorial.html">gittutorial(7)</a>[a tutorial introduction to git] or\r
<a href="user-manual.html">the git user manual</a>.</p>\r
<p>However, an understanding of these low-level tools can be helpful if\r
you want to understand git's internals.</p>\r
suggested in the previous section may be new to you. You do not\r
have to worry. git supports "shared public repository" style of\r
cooperation you are probably more familiar with as well.</p>\r
-<p>See <a href="cvs-migration.html">git for CVS users</a> for the details.</p>\r
+<p>See <a href="gitcvs-migration.html">gitcvs-migration(7)</a>[git for CVS users] for the details.</p>\r
</div>\r
<h2>Bundling your work together</h2>\r
<div class="sectionbody">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 11-Apr-2008 05:28:27 UTC\r
+Last updated 26-May-2008 01:14:52 UTC\r
</div>\r
</div>\r
</body>\r
work with a git repository.
If you just need to use git as a revision control system you may prefer
-to start with link:tutorial.html[a tutorial introduction to git] or
+to start with linkgit:gittutorial[7][a tutorial introduction to git] or
link:user-manual.html[the git user manual].
However, an understanding of these low-level tools can be helpful if
have to worry. git supports "shared public repository" style of
cooperation you are probably more familiar with as well.
-See link:cvs-migration.html[git for CVS users] for the details.
+See linkgit:gitcvs-migration[7][git for CVS users] for the details.
Bundling your work together
---------------------------
--no-ext-diff::
Disallow external diff drivers.
+--ignore-submodules::
+ Ignore changes to submodules in the diff generation.
+
--src-prefix=<prefix>::
Show the given source prefix instead of "a/".
</div>\r
<h2>SYNOPSIS</h2>\r
<div class="sectionbody">\r
-<p><em>git-cat-file</em> [-t | -s | -e | -p | <type>] <object></p>\r
+<p><em>git-cat-file</em> [-t | -s | -e | -p | <type>] <object>\r
+<em>git-cat-file</em> [--batch | --batch-check] < <list-of-objects></p>\r
</div>\r
<h2>DESCRIPTION</h2>\r
<div class="sectionbody">\r
-<p>Provides content or type of objects in the repository. The type\r
-is required unless <em>-t</em> or <em>-p</em> is used to find the object type,\r
-or <em>-s</em> is used to find the object size.</p>\r
+<p>In the first form, provides content or type of objects in the repository. The\r
+type is required unless <em>-t</em> or <em>-p</em> is used to find the object type, or <em>-s</em>\r
+is used to find the object size.</p>\r
+<p>In the second form, a list of object (separated by LFs) is provided on stdin,\r
+and the SHA1, type, and size of each object is printed on stdout.</p>\r
</div>\r
<h2>OPTIONS</h2>\r
<div class="sectionbody">\r
points at it.\r
</p>\r
</dd>\r
+<dt>\r
+--batch\r
+</dt>\r
+<dd>\r
+<p>\r
+ Print the SHA1, type, size, and contents of each object provided on\r
+ stdin. May not be combined with any other options or arguments.\r
+</p>\r
+</dd>\r
+<dt>\r
+--batch-check\r
+</dt>\r
+<dd>\r
+<p>\r
+ Print the SHA1, type, and size of each object provided on stdin. May not be\r
+ combined with any other options or arguments.\r
+</p>\r
+</dd>\r
</dl>\r
</div>\r
<h2>OUTPUT</h2>\r
<p>If <em>-s</em> is specified, the size of the <object> in bytes.</p>\r
<p>If <em>-e</em> is specified, no output.</p>\r
<p>If <em>-p</em> is specified, the contents of <object> are pretty-printed.</p>\r
-<p>Otherwise the raw (though uncompressed) contents of the <object> will\r
-be returned.</p>\r
+<p>If <type> is specified, the raw (though uncompressed) contents of the <object>\r
+will be returned.</p>\r
+<p>If <em>--batch</em> is specified, output of the following form is printed for each\r
+object specified on stdin:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt><sha1> SP <type> SP <size> LF\r
+<contents> LF</tt></pre>\r
+</div></div>\r
+<p>If <em>--batch-check</em> is specified, output of the following form is printed for\r
+each object specified fon stdin:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt><sha1> SP <type> SP <size> LF</tt></pre>\r
+</div></div>\r
+<p>For both <em>--batch</em> and <em>--batch-check</em>, output of the following form is printed\r
+for each object specified on stdin that does not exist in the repository:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt><object> SP missing LF</tt></pre>\r
+</div></div>\r
</div>\r
<h2>Author</h2>\r
<div class="sectionbody">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 07-Jan-2008 07:50:04 UTC\r
+Last updated 26-May-2008 01:14:43 UTC\r
</div>\r
</div>\r
</body>\r
SYNOPSIS
--------
'git-cat-file' [-t | -s | -e | -p | <type>] <object>
+'git-cat-file' [--batch | --batch-check] < <list-of-objects>
DESCRIPTION
-----------
-Provides content or type of objects in the repository. The type
-is required unless '-t' or '-p' is used to find the object type,
-or '-s' is used to find the object size.
+In the first form, provides content or type of objects in the repository. The
+type is required unless '-t' or '-p' is used to find the object type, or '-s'
+is used to find the object size.
+
+In the second form, a list of object (separated by LFs) is provided on stdin,
+and the SHA1, type, and size of each object is printed on stdout.
OPTIONS
-------
or to ask for a "blob" with <object> being a tag object that
points at it.
+--batch::
+ Print the SHA1, type, size, and contents of each object provided on
+ stdin. May not be combined with any other options or arguments.
+
+--batch-check::
+ Print the SHA1, type, and size of each object provided on stdin. May not be
+ combined with any other options or arguments.
+
OUTPUT
------
If '-t' is specified, one of the <type>.
If '-p' is specified, the contents of <object> are pretty-printed.
-Otherwise the raw (though uncompressed) contents of the <object> will
-be returned.
+If <type> is specified, the raw (though uncompressed) contents of the <object>
+will be returned.
+
+If '--batch' is specified, output of the following form is printed for each
+object specified on stdin:
+
+------------
+<sha1> SP <type> SP <size> LF
+<contents> LF
+------------
+
+If '--batch-check' is specified, output of the following form is printed for
+each object specified fon stdin:
+
+------------
+<sha1> SP <type> SP <size> LF
+------------
+
+For both '--batch' and '--batch-check', output of the following form is printed
+for each object specified on stdin that does not exist in the repository:
+------------
+<object> SP missing LF
+------------
Author
------
various stuff. See <a href="git-cvsserver.html">git-cvsserver(1)</a>.\r
</p>\r
</dd>\r
+</dl>\r
+<p>gitcvs.usecrlfattr\r
+ If true, the server will look up the <tt>crlf</tt> attribute for\r
+ files to determine the <em>-k</em> modes to use. If <tt>crlf</tt> is set,\r
+ the <em>-k</em> mode will be left blank, so cvs clients will\r
+ treat it as text. If <tt>crlf</tt> is explicitly unset, the file\r
+ will be set with <em>-kb</em> mode, which supresses any newline munging\r
+ the client might otherwise do. If <tt>crlf</tt> is not specified,\r
+ then <em>gitcvs.allbinary</em> is used. See <a href="gitattribute.html">gitattribute(5)</a>.</p>\r
+<dl>\r
<dt>\r
gitcvs.allbinary\r
</dt>\r
<dd>\r
<p>\r
- If true, all files are sent to the client in mode <em>-kb</em>. This\r
- causes the client to treat all files as binary files which suppresses\r
- any newline munging it otherwise might do. A work-around for the\r
- fact that there is no way yet to set single files to mode <em>-kb</em>.\r
+ This is used if <em>gitcvs.usecrlfattr</em> does not resolve\r
+ the correct <em>-kb</em> mode to use. If true, all\r
+ unresolved files are sent to the client in\r
+ mode <em>-kb</em>. This causes the client to treat them\r
+ as binary files, which suppresses any newline munging it\r
+ otherwise might do. Alternatively, if it is set to "guess",\r
+ then the contents of the file are examined to decide if\r
+ it is binary, similar to <em>core.autocrlf</em>.\r
</p>\r
</dd>\r
<dt>\r
</p>\r
</dd>\r
</dl>\r
-<p>All gitcvs variables except for <em>gitcvs.allbinary</em> can also be\r
-specified as <em>gitcvs.<access_method>.<varname></em> (where <em>access_method</em>\r
+<p>All gitcvs variables except for <em>gitcvs.usecrlfattr</em> and\r
+<em>gitcvs.allbinary</em> can also be specified as\r
+<em>gitcvs.<access_method>.<varname></em> (where <em>access_method</em>\r
is one of "ext" and "pserver") to make them apply only for the given\r
access method.</p>\r
<dl>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 24-May-2008 01:12:05 UTC\r
+Last updated 26-May-2008 01:14:43 UTC\r
</div>\r
</div>\r
</body>\r
</div>\r
<h2>SYNOPSIS</h2>\r
<div class="sectionbody">\r
-<p><em>git-cvsexportcommit</em> [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-w cvsworkdir] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID</p>\r
+<p><em>git-cvsexportcommit</em> [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-w cvsworkdir] [-W] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID</p>\r
</div>\r
<h2>DESCRIPTION</h2>\r
<div class="sectionbody">\r
</p>\r
</dd>\r
<dt>\r
+-W\r
+</dt>\r
+<dd>\r
+<p>\r
+ Tell cvsexportcommit that the current working directory is not only\r
+ a Git checkout, but also the CVS checkout. Therefore, Git will\r
+ reset the working directory to the parent commit before proceeding.\r
+</p>\r
+</dd>\r
+<dt>\r
-v\r
</dt>\r
<dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 22-May-2008 00:52:45 UTC\r
+Last updated 26-May-2008 01:14:43 UTC\r
</div>\r
</div>\r
</body>\r
SYNOPSIS
--------
-'git-cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-w cvsworkdir] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID
+'git-cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-w cvsworkdir] [-W] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID
DESCRIPTION
current directory is within a git repository. The default is the
value of 'cvsexportcommit.cvsdir'.
+-W::
+ Tell cvsexportcommit that the current working directory is not only
+ a Git checkout, but also the CVS checkout. Therefore, Git will
+ reset the working directory to the parent commit before proceeding.
+
-v::
Verbose.
checkout, diff, status, update, log, add, remove, commit.\r
Legacy monitoring operations are not supported (edit, watch and related).\r
Exports and tagging (tags and branches) are not supported at this stage.</p>\r
-<p>The server should set the <em>-k</em> mode to binary when relevant, however,\r
-this is not really implemented yet. For now, you can force the server\r
-to set <em>-kb</em> for all files by setting the <tt>gitcvs.allbinary</tt> config\r
-variable. In proper GIT tradition, the contents of the files are\r
-always respected. No keyword expansion or newline munging is supported.</p>\r
+<h3>CRLF Line Ending Conversions</h3>\r
+<p>By default the server leaves the <em>-k</em> mode blank for all files,\r
+which causes the cvs client to treat them as a text files, subject\r
+to crlf conversion on some platforms.</p>\r
+<p>You can make the server use <tt>crlf</tt> attributes to set the <em>-k</em> modes\r
+for files by setting the <tt>gitcvs.usecrlfattr</tt> config variable.\r
+In this case, if <tt>crlf</tt> is explicitly unset (<em>-crlf</em>), then the\r
+server will set <em>-kb</em> mode for binary files. If <tt>crlf</tt> is set,\r
+then the <em>-k</em> mode will explicitly be left blank. See\r
+also <a href="gitattributes.html">gitattributes(5)</a> for more information about the <tt>crlf</tt>\r
+attribute.</p>\r
+<p>Alternatively, if <tt>gitcvs.usecrlfattr</tt> config is not enabled\r
+or if the <tt>crlf</tt> attribute is unspecified for a filename, then\r
+the server uses the <tt>gitcvs.allbinary</tt> config for the default setting.\r
+If <tt>gitcvs.allbinary</tt> is set, then file not otherwise\r
+specified will default to <em>-kb</em> mode. Otherwise the <em>-k</em> mode\r
+is left blank. But if <tt>gitcvs.allbinary</tt> is set to "guess", then\r
+the correct <em>-k</em> mode will be guessed based on the contents of\r
+the file.</p>\r
+<p>For best consistency with cvs, it is probably best to override the\r
+defaults by setting <tt>gitcvs.usecrlfattr</tt> to true,\r
+and <tt>gitcvs.allbinary</tt> to "guess".</p>\r
</div>\r
<h2>Dependencies</h2>\r
<div class="sectionbody">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 16-Apr-2008 09:09:50 UTC\r
+Last updated 26-May-2008 01:14:44 UTC\r
</div>\r
</div>\r
</body>\r
Legacy monitoring operations are not supported (edit, watch and related).
Exports and tagging (tags and branches) are not supported at this stage.
-The server should set the '-k' mode to binary when relevant, however,
-this is not really implemented yet. For now, you can force the server
-to set '-kb' for all files by setting the `gitcvs.allbinary` config
-variable. In proper GIT tradition, the contents of the files are
-always respected. No keyword expansion or newline munging is supported.
+CRLF Line Ending Conversions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+By default the server leaves the '-k' mode blank for all files,
+which causes the cvs client to treat them as a text files, subject
+to crlf conversion on some platforms.
+
+You can make the server use `crlf` attributes to set the '-k' modes
+for files by setting the `gitcvs.usecrlfattr` config variable.
+In this case, if `crlf` is explicitly unset ('-crlf'), then the
+server will set '-kb' mode for binary files. If `crlf` is set,
+then the '-k' mode will explicitly be left blank. See
+also linkgit:gitattributes[5] for more information about the `crlf`
+attribute.
+
+Alternatively, if `gitcvs.usecrlfattr` config is not enabled
+or if the `crlf` attribute is unspecified for a filename, then
+the server uses the `gitcvs.allbinary` config for the default setting.
+If `gitcvs.allbinary` is set, then file not otherwise
+specified will default to '-kb' mode. Otherwise the '-k' mode
+is left blank. But if `gitcvs.allbinary` is set to "guess", then
+the correct '-k' mode will be guessed based on the contents of
+the file.
+
+For best consistency with cvs, it is probably best to override the
+defaults by setting `gitcvs.usecrlfattr` to true,
+and `gitcvs.allbinary` to "guess".
Dependencies
------------
</p>\r
</dd>\r
<dt>\r
+--ignore-submodules\r
+</dt>\r
+<dd>\r
+<p>\r
+ Ignore changes to submodules in the diff generation.\r
+</p>\r
+</dd>\r
+<dt>\r
--src-prefix=<prefix>\r
</dt>\r
<dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 23-Apr-2008 16:08:34 UTC\r
+Last updated 26-May-2008 01:14:45 UTC\r
</div>\r
</div>\r
</body>\r
</p>\r
</dd>\r
<dt>\r
+--ignore-submodules\r
+</dt>\r
+<dd>\r
+<p>\r
+ Ignore changes to submodules in the diff generation.\r
+</p>\r
+</dd>\r
+<dt>\r
--src-prefix=<prefix>\r
</dt>\r
<dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 23-Apr-2008 16:08:35 UTC\r
+Last updated 26-May-2008 01:14:45 UTC\r
</div>\r
</div>\r
</body>\r
</p>\r
</dd>\r
<dt>\r
+--ignore-submodules\r
+</dt>\r
+<dd>\r
+<p>\r
+ Ignore changes to submodules in the diff generation.\r
+</p>\r
+</dd>\r
+<dt>\r
--src-prefix=<prefix>\r
</dt>\r
<dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 23-Apr-2008 16:08:35 UTC\r
+Last updated 26-May-2008 01:14:46 UTC\r
</div>\r
</div>\r
</body>\r
</p>\r
</dd>\r
<dt>\r
+--ignore-submodules\r
+</dt>\r
+<dd>\r
+<p>\r
+ Ignore changes to submodules in the diff generation.\r
+</p>\r
+</dd>\r
+<dt>\r
--src-prefix=<prefix>\r
</dt>\r
<dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 23-Apr-2008 16:08:36 UTC\r
+Last updated 26-May-2008 01:14:46 UTC\r
</div>\r
</div>\r
</body>\r
</p>\r
</dd>\r
<dt>\r
+--ignore-submodules\r
+</dt>\r
+<dd>\r
+<p>\r
+ Ignore changes to submodules in the diff generation.\r
+</p>\r
+</dd>\r
+<dt>\r
--src-prefix=<prefix>\r
</dt>\r
<dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 14-May-2008 22:24:41 UTC\r
+Last updated 26-May-2008 01:14:47 UTC\r
</div>\r
</div>\r
</body>\r
</div>\r
<h2>SYNOPSIS</h2>\r
<div class="sectionbody">\r
-<p><em>git-hash-object</em> [-t <type>] [-w] [--stdin] [--] <file>…</p>\r
+<p><em>git-hash-object</em> [-t <type>] [-w] [--stdin | --stdin-paths] [--] <file>…</p>\r
</div>\r
<h2>DESCRIPTION</h2>\r
<div class="sectionbody">\r
Read the object from standard input instead of from a file.\r
</p>\r
</dd>\r
+<dt>\r
+--stdin-paths\r
+</dt>\r
+<dd>\r
+<p>\r
+ Read file names from stdin instead of from the command-line.\r
+</p>\r
+</dd>\r
</dl>\r
</div>\r
<h2>Author</h2>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 07-Jan-2008 07:50:24 UTC\r
+Last updated 26-May-2008 01:14:47 UTC\r
</div>\r
</div>\r
</body>\r
SYNOPSIS
--------
-'git-hash-object' [-t <type>] [-w] [--stdin] [--] <file>...
+'git-hash-object' [-t <type>] [-w] [--stdin | --stdin-paths] [--] <file>...
DESCRIPTION
-----------
--stdin::
Read the object from standard input instead of from a file.
+--stdin-paths::
+ Read file names from stdin instead of from the command-line.
+
Author
------
Written by Junio C Hamano <junkio@cox.net>
</p>\r
</dd>\r
<dt>\r
+--ignore-submodules\r
+</dt>\r
+<dd>\r
+<p>\r
+ Ignore changes to submodules in the diff generation.\r
+</p>\r
+</dd>\r
+<dt>\r
--src-prefix=<prefix>\r
</dt>\r
<dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 24-May-2008 01:12:05 UTC\r
+Last updated 26-May-2008 01:14:48 UTC\r
</div>\r
</div>\r
</body>\r
</p>\r
</dd>\r
<dt>\r
+--use-log-author\r
+</dt>\r
+<dd>\r
+<p>\r
+ When retrieving svn commits into git (as part of fetch, rebase, or\r
+ dcommit operations), look for the first From: or Signed-off-by: line\r
+ in the log message and use that as the author string.\r
+</p>\r
+</dd>\r
+<dt>\r
+--add-author-from\r
+</dt>\r
+<dd>\r
+<p>\r
+ When committing to svn from git (as part of commit or dcommit\r
+ operations), if the existing log message doesn't already have a\r
+ From: or Signed-off-by: line, append a From: line based on the\r
+ git commit's author string. If you use this, then --use-log-author\r
+ will retrieve a valid author string for all commits.\r
+</p>\r
+</dd>\r
+<dt>\r
--username=<USER>\r
</dt>\r
<dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 22-May-2008 00:52:47 UTC\r
+Last updated 26-May-2008 01:14:49 UTC\r
</div>\r
</div>\r
</body>\r
Set the 'useSvnsyncProps' option in the [svn-remote] config.
--rewrite-root=<URL>;;
Set the 'rewriteRoot' option in the [svn-remote] config.
+--use-log-author;;
+ When retrieving svn commits into git (as part of fetch, rebase, or
+ dcommit operations), look for the first From: or Signed-off-by: line
+ in the log message and use that as the author string.
+--add-author-from;;
+ When committing to svn from git (as part of commit or dcommit
+ operations), if the existing log message doesn't already have a
+ From: or Signed-off-by: line, append a From: line based on the
+ git commit's author string. If you use this, then --use-log-author
+ will retrieve a valid author string for all commits.
--username=<USER>;;
For transports that SVN handles authentication for (http,
https, and plain svn), specify the username. For other
[--cacheinfo <mode> <object> <file>]*\r
[--chmod=(+|-)x]\r
[--assume-unchanged | --no-assume-unchanged]\r
+ [--ignore-submodules]\r
[--really-refresh] [--unresolve] [--again | -g]\r
[--info-only] [--index-info]\r
[-z] [--stdin]\r
git-update-index continue anyway.\r
</p>\r
</dd>\r
+</dl>\r
+<p>--ignore-submodules:\r
+ Do not try to update submodules. This option is only respected\r
+ when passed before --refresh.</p>\r
+<dl>\r
<dt>\r
--unmerged\r
</dt>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 07-Jan-2008 07:50:55 UTC\r
+Last updated 26-May-2008 01:14:49 UTC\r
</div>\r
</div>\r
</body>\r
[--cacheinfo <mode> <object> <file>]\*
[--chmod=(+|-)x]
[--assume-unchanged | --no-assume-unchanged]
+ [--ignore-submodules]
[--really-refresh] [--unresolve] [--again | -g]
[--info-only] [--index-info]
[-z] [--stdin]
default behavior is to error out. This option makes
git-update-index continue anyway.
+--ignore-submodules:
+ Do not try to update submodules. This option is only respected
+ when passed before --refresh.
+
--unmerged::
If --refresh finds unmerged changes in the index, the default
behavior is to error out. This option makes git-update-index
<p>Git is a fast, scalable, distributed revision control system with an\r
unusually rich command set that provides both high-level operations\r
and full access to internals.</p>\r
-<p>See this <a href="tutorial.html">tutorial</a> to get started, then see\r
+<p>See this <a href="gittutorial.html">gittutorial(7)</a>[tutorial] to get started, then see\r
<a href="everyday.html">Everyday Git</a> for a useful minimum set of commands, and\r
"man git-commandname" for documentation of each command. CVS users may\r
-also want to read <a href="cvs-migration.html">CVS migration</a>. See\r
+also want to read <a href="gitcvs-migration.html">gitcvs-migration(7)</a>[CVS migration]. See\r
<a href="user-manual.html">Git User's Manual</a> for a more in-depth\r
introduction.</p>\r
<p>The COMMAND is either a name of a Git command (see below) or an alias\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 14-May-2008 22:24:43 UTC\r
+Last updated 26-May-2008 01:14:50 UTC\r
</div>\r
</div>\r
</body>\r
unusually rich command set that provides both high-level operations
and full access to internals.
-See this link:tutorial.html[tutorial] to get started, then see
+See this linkgit:gittutorial[7][tutorial] to get started, then see
link:everyday.html[Everyday Git] for a useful minimum set of commands, and
"man git-commandname" for documentation of each command. CVS users may
-also want to read link:cvs-migration.html[CVS migration]. See
+also want to read linkgit:gitcvs-migration[7][CVS migration]. See
link:user-manual.html[Git User's Manual] for a more in-depth
introduction.
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
+<meta name="generator" content="AsciiDoc 7.0.2" />\r
+<style type="text/css">\r
+/* Debug borders */\r
+p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
+/*\r
+ border: 1px solid red;\r
+*/\r
+}\r
+\r
+body {\r
+ margin: 1em 5% 1em 5%;\r
+}\r
+\r
+a { color: blue; }\r
+a:visited { color: fuchsia; }\r
+\r
+em {\r
+ font-style: italic;\r
+}\r
+\r
+strong {\r
+ font-weight: bold;\r
+}\r
+\r
+tt {\r
+ color: navy;\r
+}\r
+\r
+h1, h2, h3, h4, h5, h6 {\r
+ color: #527bbd;\r
+ font-family: sans-serif;\r
+ margin-top: 1.2em;\r
+ margin-bottom: 0.5em;\r
+ line-height: 1.3;\r
+}\r
+\r
+h1 {\r
+ border-bottom: 2px solid silver;\r
+}\r
+h2 {\r
+ border-bottom: 2px solid silver;\r
+ padding-top: 0.5em;\r
+}\r
+\r
+div.sectionbody {\r
+ font-family: serif;\r
+ margin-left: 0;\r
+}\r
+\r
+hr {\r
+ border: 1px solid silver;\r
+}\r
+\r
+p {\r
+ margin-top: 0.5em;\r
+ margin-bottom: 0.5em;\r
+}\r
+\r
+pre {\r
+ padding: 0;\r
+ margin: 0;\r
+}\r
+\r
+span#author {\r
+ color: #527bbd;\r
+ font-family: sans-serif;\r
+ font-weight: bold;\r
+ font-size: 1.2em;\r
+}\r
+span#email {\r
+}\r
+span#revision {\r
+ font-family: sans-serif;\r
+}\r
+\r
+div#footer {\r
+ font-family: sans-serif;\r
+ font-size: small;\r
+ border-top: 2px solid silver;\r
+ padding-top: 0.5em;\r
+ margin-top: 4.0em;\r
+}\r
+div#footer-text {\r
+ float: left;\r
+ padding-bottom: 0.5em;\r
+}\r
+div#footer-badges {\r
+ float: right;\r
+ padding-bottom: 0.5em;\r
+}\r
+\r
+div#preamble,\r
+div.tableblock, div.imageblock, div.exampleblock, div.verseblock,\r
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,\r
+div.admonitionblock {\r
+ margin-right: 10%;\r
+ margin-top: 1.5em;\r
+ margin-bottom: 1.5em;\r
+}\r
+div.admonitionblock {\r
+ margin-top: 2.5em;\r
+ margin-bottom: 2.5em;\r
+}\r
+\r
+div.content { /* Block element content. */\r
+ padding: 0;\r
+}\r
+\r
+/* Block element titles. */\r
+div.title, caption.title {\r
+ font-family: sans-serif;\r
+ font-weight: bold;\r
+ text-align: left;\r
+ margin-top: 1.0em;\r
+ margin-bottom: 0.5em;\r
+}\r
+div.title + * {\r
+ margin-top: 0;\r
+}\r
+\r
+td div.title:first-child {\r
+ margin-top: 0.0em;\r
+}\r
+div.content div.title:first-child {\r
+ margin-top: 0.0em;\r
+}\r
+div.content + div.title {\r
+ margin-top: 0.0em;\r
+}\r
+\r
+div.sidebarblock > div.content {\r
+ background: #ffffee;\r
+ border: 1px solid silver;\r
+ padding: 0.5em;\r
+}\r
+\r
+div.listingblock > div.content {\r
+ border: 1px solid silver;\r
+ background: #f4f4f4;\r
+ padding: 0.5em;\r
+}\r
+\r
+div.quoteblock > div.content {\r
+ padding-left: 2.0em;\r
+}\r
+div.quoteblock .attribution {\r
+ text-align: right;\r
+}\r
+\r
+div.admonitionblock .icon {\r
+ vertical-align: top;\r
+ font-size: 1.1em;\r
+ font-weight: bold;\r
+ text-decoration: underline;\r
+ color: #527bbd;\r
+ padding-right: 0.5em;\r
+}\r
+div.admonitionblock td.content {\r
+ padding-left: 0.5em;\r
+ border-left: 2px solid silver;\r
+}\r
+\r
+div.exampleblock > div.content {\r
+ border-left: 2px solid silver;\r
+ padding: 0.5em;\r
+}\r
+\r
+div.verseblock div.content {\r
+ white-space: pre;\r
+}\r
+\r
+div.imageblock div.content { padding-left: 0; }\r
+div.imageblock img { border: 1px solid silver; }\r
+span.image img { border-style: none; }\r
+\r
+dl {\r
+ margin-top: 0.8em;\r
+ margin-bottom: 0.8em;\r
+}\r
+dt {\r
+ margin-top: 0.5em;\r
+ margin-bottom: 0;\r
+ font-style: italic;\r
+}\r
+dd > *:first-child {\r
+ margin-top: 0;\r
+}\r
+\r
+ul, ol {\r
+ list-style-position: outside;\r
+}\r
+ol.olist2 {\r
+ list-style-type: lower-alpha;\r
+}\r
+\r
+div.tableblock > table {\r
+ border-color: #527bbd;\r
+ border-width: 3px;\r
+}\r
+thead {\r
+ font-family: sans-serif;\r
+ font-weight: bold;\r
+}\r
+tfoot {\r
+ font-weight: bold;\r
+}\r
+\r
+div.hlist {\r
+ margin-top: 0.8em;\r
+ margin-bottom: 0.8em;\r
+}\r
+td.hlist1 {\r
+ vertical-align: top;\r
+ font-style: italic;\r
+ padding-right: 0.8em;\r
+}\r
+td.hlist2 {\r
+ vertical-align: top;\r
+}\r
+\r
+@media print {\r
+ div#footer-badges { display: none; }\r
+}\r
+include::./stylesheets/xhtml11-manpage.css[]\r
+/* Workarounds for IE6's broken and incomplete CSS2. */\r
+\r
+div.sidebar-content {\r
+ background: #ffffee;\r
+ border: 1px solid silver;\r
+ padding: 0.5em;\r
+}\r
+div.sidebar-title, div.image-title {\r
+ font-family: sans-serif;\r
+ font-weight: bold;\r
+ margin-top: 0.0em;\r
+ margin-bottom: 0.5em;\r
+}\r
+\r
+div.listingblock div.content {\r
+ border: 1px solid silver;\r
+ background: #f4f4f4;\r
+ padding: 0.5em;\r
+}\r
+\r
+div.quoteblock-content {\r
+ padding-left: 2.0em;\r
+}\r
+\r
+div.exampleblock-content {\r
+ border-left: 2px solid silver;\r
+ padding-left: 0.5em;\r
+}\r
+</style>\r
+<title>gitcvs-migration(7)</title>\r
+</head>\r
+<body>\r
+<div id="header">\r
+<h1>\r
+gitcvs-migration(7) Manual Page\r
+</h1>\r
+<h2>NAME</h2>\r
+<div class="sectionbody">\r
+<p>gitcvs-migration -\r
+ git for CVS users\r
+</p>\r
+</div>\r
+</div>\r
+<h2>SYNOPSIS</h2>\r
+<div class="sectionbody">\r
+<p>git cvsimport *</p>\r
+</div>\r
+<h2>DESCRIPTION</h2>\r
+<div class="sectionbody">\r
+<p>Git differs from CVS in that every working tree contains a repository with\r
+a full copy of the project history, and no repository is inherently more\r
+important than any other. However, you can emulate the CVS model by\r
+designating a single shared repository which people can synchronize with;\r
+this document explains how to do that.</p>\r
+<p>Some basic familiarity with git is required. This\r
+<a href="gittutorial.html">gittutorial(7)</a>[tutorial introduction to git] and the\r
+<a href="glossary.html">git glossary</a> should be sufficient.</p>\r
+</div>\r
+<h2>Developing against a shared repository</h2>\r
+<div class="sectionbody">\r
+<p>Suppose a shared repository is set up in /pub/repo.git on the host\r
+foo.com. Then as an individual committer you can clone the shared\r
+repository over ssh with:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git clone foo.com:/pub/repo.git/ my-project\r
+$ cd my-project</tt></pre>\r
+</div></div>\r
+<p>and hack away. The equivalent of <tt>cvs update</tt> is</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git pull origin</tt></pre>\r
+</div></div>\r
+<p>which merges in any work that others might have done since the clone\r
+operation. If there are uncommitted changes in your working tree, commit\r
+them first before running git pull.</p>\r
+<div class="admonitionblock">\r
+<table><tr>\r
+<td class="icon">\r
+<div class="title">Note</div>\r
+</td>\r
+<td class="content">\r
+<p>The <tt>pull</tt> command knows where to get updates from because of certain\r
+configuration variables that were set by the first <tt>git clone</tt>\r
+command; see <tt>git config -l</tt> and the <a href="git-config.html">git-config(1)</a> man\r
+page for details.</p>\r
+</td>\r
+</tr></table>\r
+</div>\r
+<p>You can update the shared repository with your changes by first committing\r
+your changes, and then using the <a href="git-push.html">git-push(1)</a> command:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git push origin master</tt></pre>\r
+</div></div>\r
+<p>to "push" those commits to the shared repository. If someone else has\r
+updated the repository more recently, <tt>git push</tt>, like <tt>cvs commit</tt>, will\r
+complain, in which case you must pull any changes before attempting the\r
+push again.</p>\r
+<p>In the <tt>git push</tt> command above we specify the name of the remote branch\r
+to update (<tt>master</tt>). If we leave that out, <tt>git push</tt> tries to update\r
+any branches in the remote repository that have the same name as a branch\r
+in the local repository. So the last <tt>push</tt> can be done with either of:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git push origin\r
+$ git push foo.com:/pub/project.git/</tt></pre>\r
+</div></div>\r
+<p>as long as the shared repository does not have any branches\r
+other than <tt>master</tt>.</p>\r
+</div>\r
+<h2>Setting Up a Shared Repository</h2>\r
+<div class="sectionbody">\r
+<p>We assume you have already created a git repository for your project,\r
+possibly created from scratch or from a tarball (see the\r
+<a href="gittutorial.html">gittutorial(7)</a>[tutorial]), or imported from an already existing CVS\r
+repository (see the next section).</p>\r
+<p>Assume your existing repo is at /home/alice/myproject. Create a new "bare"\r
+repository (a repository without a working tree) and fetch your project into\r
+it:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ mkdir /pub/my-repo.git\r
+$ cd /pub/my-repo.git\r
+$ git --bare init --shared\r
+$ git --bare fetch /home/alice/myproject master:master</tt></pre>\r
+</div></div>\r
+<p>Next, give every team member read/write access to this repository. One\r
+easy way to do this is to give all the team members ssh access to the\r
+machine where the repository is hosted. If you don't want to give them a\r
+full shell on the machine, there is a restricted shell which only allows\r
+users to do git pushes and pulls; see <a href="git-shell.html">git-shell(1)</a>.</p>\r
+<p>Put all the committers in the same group, and make the repository\r
+writable by that group:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ chgrp -R $group /pub/my-repo.git</tt></pre>\r
+</div></div>\r
+<p>Make sure committers have a umask of at most 027, so that the directories\r
+they create are writable and searchable by other group members.</p>\r
+</div>\r
+<h2>Importing a CVS archive</h2>\r
+<div class="sectionbody">\r
+<p>First, install version 2.1 or higher of cvsps from\r
+<a href="http://www.cobite.com/cvsps/">http://www.cobite.com/cvsps/</a> and make\r
+sure it is in your path. Then cd to a checked out CVS working directory\r
+of the project you are interested in and run <a href="git-cvsimport.html">git-cvsimport(1)</a>:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git cvsimport -C <destination> <module></tt></pre>\r
+</div></div>\r
+<p>This puts a git archive of the named CVS module in the directory\r
+<destination>, which will be created if necessary.</p>\r
+<p>The import checks out from CVS every revision of every file. Reportedly\r
+cvsimport can average some twenty revisions per second, so for a\r
+medium-sized project this should not take more than a couple of minutes.\r
+Larger projects or remote repositories may take longer.</p>\r
+<p>The main trunk is stored in the git branch named <tt>origin</tt>, and additional\r
+CVS branches are stored in git branches with the same names. The most\r
+recent version of the main trunk is also left checked out on the <tt>master</tt>\r
+branch, so you can start adding your own changes right away.</p>\r
+<p>The import is incremental, so if you call it again next month it will\r
+fetch any CVS updates that have been made in the meantime. For this to\r
+work, you must not modify the imported branches; instead, create new\r
+branches for your own changes, and merge in the imported branches as\r
+necessary.</p>\r
+</div>\r
+<h2>Advanced Shared Repository Management</h2>\r
+<div class="sectionbody">\r
+<p>Git allows you to specify scripts called "hooks" to be run at certain\r
+points. You can use these, for example, to send all commits to the shared\r
+repository to a mailing list. See <a href="githooks.html">githooks(5)</a>[Hooks used by git].</p>\r
+<p>You can enforce finer grained permissions using update hooks. See\r
+<a href="howto/update-hook-example.txt">Controlling access to branches using\r
+update hooks</a>.</p>\r
+</div>\r
+<h2>Providing CVS Access to a git Repository</h2>\r
+<div class="sectionbody">\r
+<p>It is also possible to provide true CVS access to a git repository, so\r
+that developers can still use CVS; see <a href="git-cvsserver.html">git-cvsserver(1)</a> for\r
+details.</p>\r
+</div>\r
+<h2>Alternative Development Models</h2>\r
+<div class="sectionbody">\r
+<p>CVS users are accustomed to giving a group of developers commit access to\r
+a common repository. As we've seen, this is also possible with git.\r
+However, the distributed nature of git allows other development models,\r
+and you may want to first consider whether one of them might be a better\r
+fit for your project.</p>\r
+<p>For example, you can choose a single person to maintain the project's\r
+primary public repository. Other developers then clone this repository\r
+and each work in their own clone. When they have a series of changes that\r
+they're happy with, they ask the maintainer to pull from the branch\r
+containing the changes. The maintainer reviews their changes and pulls\r
+them into the primary repository, which other developers pull from as\r
+necessary to stay coordinated. The Linux kernel and other projects use\r
+variants of this model.</p>\r
+<p>With a small group, developers may just pull changes from each other's\r
+repositories without the need for a central maintainer.</p>\r
+</div>\r
+<h2>SEE ALSO</h2>\r
+<div class="sectionbody">\r
+<p><a href="gittutorial.html">gittutorial(7)</a>, <a href="gittutorial-2.html">gittutorial-2(7)</a>,\r
+<a href="everyday.html">Everyday Git</a>,\r
+<a href="user-manual.html">The Git User's Manual</a></p>\r
+</div>\r
+<h2>GIT</h2>\r
+<div class="sectionbody">\r
+<p>Part of the <a href="git.html">git(7)</a> suite.</p>\r
+</div>\r
+<div id="footer">\r
+<div id="footer-text">\r
+Last updated 26-May-2008 01:14:52 UTC\r
+</div>\r
+</div>\r
+</body>\r
+</html>\r
-git for CVS users
-=================
+gitcvs-migration(7)
+===================
+
+NAME
+----
+gitcvs-migration - git for CVS users
+
+SYNOPSIS
+--------
+git cvsimport *
+
+DESCRIPTION
+-----------
Git differs from CVS in that every working tree contains a repository with
a full copy of the project history, and no repository is inherently more
this document explains how to do that.
Some basic familiarity with git is required. This
-link:tutorial.html[tutorial introduction to git] and the
+linkgit:gittutorial[7][tutorial introduction to git] and the
link:glossary.html[git glossary] should be sufficient.
Developing against a shared repository
We assume you have already created a git repository for your project,
possibly created from scratch or from a tarball (see the
-link:tutorial.html[tutorial]), or imported from an already existing CVS
+linkgit:gittutorial[7][tutorial]), or imported from an already existing CVS
repository (see the next section).
Assume your existing repo is at /home/alice/myproject. Create a new "bare"
With a small group, developers may just pull changes from each other's
repositories without the need for a central maintainer.
+
+SEE ALSO
+--------
+linkgit:gittutorial[7], linkgit:gittutorial-2[7],
+link:everyday.html[Everyday Git],
+link:user-manual.html[The Git User's Manual]
+
+GIT
+---
+Part of the linkgit:git[7] suite.
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
+<meta name="generator" content="AsciiDoc 7.0.2" />\r
+<style type="text/css">\r
+/* Debug borders */\r
+p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
+/*\r
+ border: 1px solid red;\r
+*/\r
+}\r
+\r
+body {\r
+ margin: 1em 5% 1em 5%;\r
+}\r
+\r
+a { color: blue; }\r
+a:visited { color: fuchsia; }\r
+\r
+em {\r
+ font-style: italic;\r
+}\r
+\r
+strong {\r
+ font-weight: bold;\r
+}\r
+\r
+tt {\r
+ color: navy;\r
+}\r
+\r
+h1, h2, h3, h4, h5, h6 {\r
+ color: #527bbd;\r
+ font-family: sans-serif;\r
+ margin-top: 1.2em;\r
+ margin-bottom: 0.5em;\r
+ line-height: 1.3;\r
+}\r
+\r
+h1 {\r
+ border-bottom: 2px solid silver;\r
+}\r
+h2 {\r
+ border-bottom: 2px solid silver;\r
+ padding-top: 0.5em;\r
+}\r
+\r
+div.sectionbody {\r
+ font-family: serif;\r
+ margin-left: 0;\r
+}\r
+\r
+hr {\r
+ border: 1px solid silver;\r
+}\r
+\r
+p {\r
+ margin-top: 0.5em;\r
+ margin-bottom: 0.5em;\r
+}\r
+\r
+pre {\r
+ padding: 0;\r
+ margin: 0;\r
+}\r
+\r
+span#author {\r
+ color: #527bbd;\r
+ font-family: sans-serif;\r
+ font-weight: bold;\r
+ font-size: 1.2em;\r
+}\r
+span#email {\r
+}\r
+span#revision {\r
+ font-family: sans-serif;\r
+}\r
+\r
+div#footer {\r
+ font-family: sans-serif;\r
+ font-size: small;\r
+ border-top: 2px solid silver;\r
+ padding-top: 0.5em;\r
+ margin-top: 4.0em;\r
+}\r
+div#footer-text {\r
+ float: left;\r
+ padding-bottom: 0.5em;\r
+}\r
+div#footer-badges {\r
+ float: right;\r
+ padding-bottom: 0.5em;\r
+}\r
+\r
+div#preamble,\r
+div.tableblock, div.imageblock, div.exampleblock, div.verseblock,\r
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,\r
+div.admonitionblock {\r
+ margin-right: 10%;\r
+ margin-top: 1.5em;\r
+ margin-bottom: 1.5em;\r
+}\r
+div.admonitionblock {\r
+ margin-top: 2.5em;\r
+ margin-bottom: 2.5em;\r
+}\r
+\r
+div.content { /* Block element content. */\r
+ padding: 0;\r
+}\r
+\r
+/* Block element titles. */\r
+div.title, caption.title {\r
+ font-family: sans-serif;\r
+ font-weight: bold;\r
+ text-align: left;\r
+ margin-top: 1.0em;\r
+ margin-bottom: 0.5em;\r
+}\r
+div.title + * {\r
+ margin-top: 0;\r
+}\r
+\r
+td div.title:first-child {\r
+ margin-top: 0.0em;\r
+}\r
+div.content div.title:first-child {\r
+ margin-top: 0.0em;\r
+}\r
+div.content + div.title {\r
+ margin-top: 0.0em;\r
+}\r
+\r
+div.sidebarblock > div.content {\r
+ background: #ffffee;\r
+ border: 1px solid silver;\r
+ padding: 0.5em;\r
+}\r
+\r
+div.listingblock > div.content {\r
+ border: 1px solid silver;\r
+ background: #f4f4f4;\r
+ padding: 0.5em;\r
+}\r
+\r
+div.quoteblock > div.content {\r
+ padding-left: 2.0em;\r
+}\r
+div.quoteblock .attribution {\r
+ text-align: right;\r
+}\r
+\r
+div.admonitionblock .icon {\r
+ vertical-align: top;\r
+ font-size: 1.1em;\r
+ font-weight: bold;\r
+ text-decoration: underline;\r
+ color: #527bbd;\r
+ padding-right: 0.5em;\r
+}\r
+div.admonitionblock td.content {\r
+ padding-left: 0.5em;\r
+ border-left: 2px solid silver;\r
+}\r
+\r
+div.exampleblock > div.content {\r
+ border-left: 2px solid silver;\r
+ padding: 0.5em;\r
+}\r
+\r
+div.verseblock div.content {\r
+ white-space: pre;\r
+}\r
+\r
+div.imageblock div.content { padding-left: 0; }\r
+div.imageblock img { border: 1px solid silver; }\r
+span.image img { border-style: none; }\r
+\r
+dl {\r
+ margin-top: 0.8em;\r
+ margin-bottom: 0.8em;\r
+}\r
+dt {\r
+ margin-top: 0.5em;\r
+ margin-bottom: 0;\r
+ font-style: italic;\r
+}\r
+dd > *:first-child {\r
+ margin-top: 0;\r
+}\r
+\r
+ul, ol {\r
+ list-style-position: outside;\r
+}\r
+ol.olist2 {\r
+ list-style-type: lower-alpha;\r
+}\r
+\r
+div.tableblock > table {\r
+ border-color: #527bbd;\r
+ border-width: 3px;\r
+}\r
+thead {\r
+ font-family: sans-serif;\r
+ font-weight: bold;\r
+}\r
+tfoot {\r
+ font-weight: bold;\r
+}\r
+\r
+div.hlist {\r
+ margin-top: 0.8em;\r
+ margin-bottom: 0.8em;\r
+}\r
+td.hlist1 {\r
+ vertical-align: top;\r
+ font-style: italic;\r
+ padding-right: 0.8em;\r
+}\r
+td.hlist2 {\r
+ vertical-align: top;\r
+}\r
+\r
+@media print {\r
+ div#footer-badges { display: none; }\r
+}\r
+include::./stylesheets/xhtml11-manpage.css[]\r
+/* Workarounds for IE6's broken and incomplete CSS2. */\r
+\r
+div.sidebar-content {\r
+ background: #ffffee;\r
+ border: 1px solid silver;\r
+ padding: 0.5em;\r
+}\r
+div.sidebar-title, div.image-title {\r
+ font-family: sans-serif;\r
+ font-weight: bold;\r
+ margin-top: 0.0em;\r
+ margin-bottom: 0.5em;\r
+}\r
+\r
+div.listingblock div.content {\r
+ border: 1px solid silver;\r
+ background: #f4f4f4;\r
+ padding: 0.5em;\r
+}\r
+\r
+div.quoteblock-content {\r
+ padding-left: 2.0em;\r
+}\r
+\r
+div.exampleblock-content {\r
+ border-left: 2px solid silver;\r
+ padding-left: 0.5em;\r
+}\r
+</style>\r
+<title>gittutorial-2(7)</title>\r
+</head>\r
+<body>\r
+<div id="header">\r
+<h1>\r
+gittutorial-2(7) Manual Page\r
+</h1>\r
+<h2>NAME</h2>\r
+<div class="sectionbody">\r
+<p>gittutorial-2 -\r
+ A tutorial introduction to git: part two\r
+</p>\r
+</div>\r
+</div>\r
+<h2>SYNOPSIS</h2>\r
+<div class="sectionbody">\r
+<p>git *</p>\r
+</div>\r
+<h2>DESCRIPTION</h2>\r
+<div class="sectionbody">\r
+<p>You should work through <a href="gittutorial.html">gittutorial(7)</a>[A tutorial introduction to\r
+git] before reading this tutorial.</p>\r
+<p>The goal of this tutorial is to introduce two fundamental pieces of\r
+git's architecture--the object database and the index file--and to\r
+provide the reader with everything necessary to understand the rest\r
+of the git documentation.</p>\r
+</div>\r
+<h2>The git object database</h2>\r
+<div class="sectionbody">\r
+<p>Let's start a new project and create a small amount of history:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ mkdir test-project\r
+$ cd test-project\r
+$ git init\r
+Initialized empty Git repository in .git/\r
+$ echo 'hello world' > file.txt\r
+$ git add .\r
+$ git commit -a -m "initial commit"\r
+Created initial commit 54196cc2703dc165cbd373a65a4dcf22d50ae7f7\r
+ create mode 100644 file.txt\r
+$ echo 'hello world!' >file.txt\r
+$ git commit -a -m "add emphasis"\r
+Created commit c4d59f390b9cfd4318117afde11d601c1085f241</tt></pre>\r
+</div></div>\r
+<p>What are the 40 digits of hex that git responded to the commit with?</p>\r
+<p>We saw in part one of the tutorial that commits have names like this.\r
+It turns out that every object in the git history is stored under\r
+such a 40-digit hex name. That name is the SHA1 hash of the object's\r
+contents; among other things, this ensures that git will never store\r
+the same data twice (since identical data is given an identical SHA1\r
+name), and that the contents of a git object will never change (since\r
+that would change the object's name as well).</p>\r
+<p>It is expected that the content of the commit object you created while\r
+following the example above generates a different SHA1 hash than\r
+the one shown above because the commit object records the time when\r
+it was created and the name of the person performing the commit.</p>\r
+<p>We can ask git about this particular object with the cat-file\r
+command. Don't copy the 40 hex digits from this example but use those\r
+from your own version. Note that you can shorten it to only a few\r
+characters to save yourself typing all 40 hex digits:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git-cat-file -t 54196cc2\r
+commit\r
+$ git-cat-file commit 54196cc2\r
+tree 92b8b694ffb1675e5975148e1121810081dbdffe\r
+author J. Bruce Fields <bfields@puzzle.fieldses.org> 1143414668 -0500\r
+committer J. Bruce Fields <bfields@puzzle.fieldses.org> 1143414668 -0500\r
+\r
+initial commit</tt></pre>\r
+</div></div>\r
+<p>A tree can refer to one or more "blob" objects, each corresponding to\r
+a file. In addition, a tree can also refer to other tree objects,\r
+thus creating a directory hierarchy. You can examine the contents of\r
+any tree using ls-tree (remember that a long enough initial portion\r
+of the SHA1 will also work):</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git ls-tree 92b8b694\r
+100644 blob 3b18e512dba79e4c8300dd08aeb37f8e728b8dad file.txt</tt></pre>\r
+</div></div>\r
+<p>Thus we see that this tree has one file in it. The SHA1 hash is a\r
+reference to that file's data:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git cat-file -t 3b18e512\r
+blob</tt></pre>\r
+</div></div>\r
+<p>A "blob" is just file data, which we can also examine with cat-file:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git cat-file blob 3b18e512\r
+hello world</tt></pre>\r
+</div></div>\r
+<p>Note that this is the old file data; so the object that git named in\r
+its response to the initial tree was a tree with a snapshot of the\r
+directory state that was recorded by the first commit.</p>\r
+<p>All of these objects are stored under their SHA1 names inside the git\r
+directory:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ find .git/objects/\r
+.git/objects/\r
+.git/objects/pack\r
+.git/objects/info\r
+.git/objects/3b\r
+.git/objects/3b/18e512dba79e4c8300dd08aeb37f8e728b8dad\r
+.git/objects/92\r
+.git/objects/92/b8b694ffb1675e5975148e1121810081dbdffe\r
+.git/objects/54\r
+.git/objects/54/196cc2703dc165cbd373a65a4dcf22d50ae7f7\r
+.git/objects/a0\r
+.git/objects/a0/423896973644771497bdc03eb99d5281615b51\r
+.git/objects/d0\r
+.git/objects/d0/492b368b66bdabf2ac1fd8c92b39d3db916e59\r
+.git/objects/c4\r
+.git/objects/c4/d59f390b9cfd4318117afde11d601c1085f241</tt></pre>\r
+</div></div>\r
+<p>and the contents of these files is just the compressed data plus a\r
+header identifying their length and their type. The type is either a\r
+blob, a tree, a commit, or a tag.</p>\r
+<p>The simplest commit to find is the HEAD commit, which we can find\r
+from .git/HEAD:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ cat .git/HEAD\r
+ref: refs/heads/master</tt></pre>\r
+</div></div>\r
+<p>As you can see, this tells us which branch we're currently on, and it\r
+tells us this by naming a file under the .git directory, which itself\r
+contains a SHA1 name referring to a commit object, which we can\r
+examine with cat-file:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ cat .git/refs/heads/master\r
+c4d59f390b9cfd4318117afde11d601c1085f241\r
+$ git cat-file -t c4d59f39\r
+commit\r
+$ git cat-file commit c4d59f39\r
+tree d0492b368b66bdabf2ac1fd8c92b39d3db916e59\r
+parent 54196cc2703dc165cbd373a65a4dcf22d50ae7f7\r
+author J. Bruce Fields <bfields@puzzle.fieldses.org> 1143418702 -0500\r
+committer J. Bruce Fields <bfields@puzzle.fieldses.org> 1143418702 -0500\r
+\r
+add emphasis</tt></pre>\r
+</div></div>\r
+<p>The "tree" object here refers to the new state of the tree:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git ls-tree d0492b36\r
+100644 blob a0423896973644771497bdc03eb99d5281615b51 file.txt\r
+$ git cat-file blob a0423896\r
+hello world!</tt></pre>\r
+</div></div>\r
+<p>and the "parent" object refers to the previous commit:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git-cat-file commit 54196cc2\r
+tree 92b8b694ffb1675e5975148e1121810081dbdffe\r
+author J. Bruce Fields <bfields@puzzle.fieldses.org> 1143414668 -0500\r
+committer J. Bruce Fields <bfields@puzzle.fieldses.org> 1143414668 -0500\r
+\r
+initial commit</tt></pre>\r
+</div></div>\r
+<p>The tree object is the tree we examined first, and this commit is\r
+unusual in that it lacks any parent.</p>\r
+<p>Most commits have only one parent, but it is also common for a commit\r
+to have multiple parents. In that case the commit represents a\r
+merge, with the parent references pointing to the heads of the merged\r
+branches.</p>\r
+<p>Besides blobs, trees, and commits, the only remaining type of object\r
+is a "tag", which we won't discuss here; refer to <a href="git-tag.html">git-tag(1)</a>\r
+for details.</p>\r
+<p>So now we know how git uses the object database to represent a\r
+project's history:</p>\r
+<ul>\r
+<li>\r
+<p>\r
+"commit" objects refer to "tree" objects representing the\r
+ snapshot of a directory tree at a particular point in the\r
+ history, and refer to "parent" commits to show how they're\r
+ connected into the project history.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+"tree" objects represent the state of a single directory,\r
+ associating directory names to "blob" objects containing file\r
+ data and "tree" objects containing subdirectory information.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+"blob" objects contain file data without any other structure.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+References to commit objects at the head of each branch are\r
+ stored in files under .git/refs/heads/.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+The name of the current branch is stored in .git/HEAD.\r
+</p>\r
+</li>\r
+</ul>\r
+<p>Note, by the way, that lots of commands take a tree as an argument.\r
+But as we can see above, a tree can be referred to in many different\r
+ways--by the SHA1 name for that tree, by the name of a commit that\r
+refers to the tree, by the name of a branch whose head refers to that\r
+tree, etc.--and most such commands can accept any of these names.</p>\r
+<p>In command synopses, the word "tree-ish" is sometimes used to\r
+designate such an argument.</p>\r
+</div>\r
+<h2>The index file</h2>\r
+<div class="sectionbody">\r
+<p>The primary tool we've been using to create commits is "git commit\r
+-a", which creates a commit including every change you've made to\r
+your working tree. But what if you want to commit changes only to\r
+certain files? Or only certain changes to certain files?</p>\r
+<p>If we look at the way commits are created under the cover, we'll see\r
+that there are more flexible ways creating commits.</p>\r
+<p>Continuing with our test-project, let's modify file.txt again:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ echo "hello world, again" >>file.txt</tt></pre>\r
+</div></div>\r
+<p>but this time instead of immediately making the commit, let's take an\r
+intermediate step, and ask for diffs along the way to keep track of\r
+what's happening:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git diff\r
+--- a/file.txt\r
++++ b/file.txt\r
+@@ -1 +1,2 @@\r
+ hello world!\r
++hello world, again\r
+$ git add file.txt\r
+$ git diff</tt></pre>\r
+</div></div>\r
+<p>The last diff is empty, but no new commits have been made, and the\r
+head still doesn't contain the new line:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git-diff HEAD\r
+diff --git a/file.txt b/file.txt\r
+index a042389..513feba 100644\r
+--- a/file.txt\r
++++ b/file.txt\r
+@@ -1 +1,2 @@\r
+ hello world!\r
++hello world, again</tt></pre>\r
+</div></div>\r
+<p>So "git diff" is comparing against something other than the head.\r
+The thing that it's comparing against is actually the index file,\r
+which is stored in .git/index in a binary format, but whose contents\r
+we can examine with ls-files:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git ls-files --stage\r
+100644 513feba2e53ebbd2532419ded848ba19de88ba00 0 file.txt\r
+$ git cat-file -t 513feba2\r
+blob\r
+$ git cat-file blob 513feba2\r
+hello world!\r
+hello world, again</tt></pre>\r
+</div></div>\r
+<p>So what our "git add" did was store a new blob and then put\r
+a reference to it in the index file. If we modify the file again,\r
+we'll see that the new modifications are reflected in the "git-diff"\r
+output:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ echo 'again?' >>file.txt\r
+$ git diff\r
+index 513feba..ba3da7b 100644\r
+--- a/file.txt\r
++++ b/file.txt\r
+@@ -1,2 +1,3 @@\r
+ hello world!\r
+ hello world, again\r
++again?</tt></pre>\r
+</div></div>\r
+<p>With the right arguments, git diff can also show us the difference\r
+between the working directory and the last commit, or between the\r
+index and the last commit:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git diff HEAD\r
+diff --git a/file.txt b/file.txt\r
+index a042389..ba3da7b 100644\r
+--- a/file.txt\r
++++ b/file.txt\r
+@@ -1 +1,3 @@\r
+ hello world!\r
++hello world, again\r
++again?\r
+$ git diff --cached\r
+diff --git a/file.txt b/file.txt\r
+index a042389..513feba 100644\r
+--- a/file.txt\r
++++ b/file.txt\r
+@@ -1 +1,2 @@\r
+ hello world!\r
++hello world, again</tt></pre>\r
+</div></div>\r
+<p>At any time, we can create a new commit using "git commit" (without\r
+the -a option), and verify that the state committed only includes the\r
+changes stored in the index file, not the additional change that is\r
+still only in our working tree:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git commit -m "repeat"\r
+$ git diff HEAD\r
+diff --git a/file.txt b/file.txt\r
+index 513feba..ba3da7b 100644\r
+--- a/file.txt\r
++++ b/file.txt\r
+@@ -1,2 +1,3 @@\r
+ hello world!\r
+ hello world, again\r
++again?</tt></pre>\r
+</div></div>\r
+<p>So by default "git commit" uses the index to create the commit, not\r
+the working tree; the -a option to commit tells it to first update\r
+the index with all changes in the working tree.</p>\r
+<p>Finally, it's worth looking at the effect of "git add" on the index\r
+file:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ echo "goodbye, world" >closing.txt\r
+$ git add closing.txt</tt></pre>\r
+</div></div>\r
+<p>The effect of the "git add" was to add one entry to the index file:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git ls-files --stage\r
+100644 8b9743b20d4b15be3955fc8d5cd2b09cd2336138 0 closing.txt\r
+100644 513feba2e53ebbd2532419ded848ba19de88ba00 0 file.txt</tt></pre>\r
+</div></div>\r
+<p>And, as you can see with cat-file, this new entry refers to the\r
+current contents of the file:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git cat-file blob 8b9743b2\r
+goodbye, world</tt></pre>\r
+</div></div>\r
+<p>The "status" command is a useful way to get a quick summary of the\r
+situation:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git status\r
+# On branch master\r
+# Changes to be committed:\r
+# (use "git reset HEAD <file>..." to unstage)\r
+#\r
+# new file: closing.txt\r
+#\r
+# Changed but not updated:\r
+# (use "git add <file>..." to update what will be committed)\r
+#\r
+# modified: file.txt\r
+#</tt></pre>\r
+</div></div>\r
+<p>Since the current state of closing.txt is cached in the index file,\r
+it is listed as "Changes to be committed". Since file.txt has\r
+changes in the working directory that aren't reflected in the index,\r
+it is marked "changed but not updated". At this point, running "git\r
+commit" would create a commit that added closing.txt (with its new\r
+contents), but that didn't modify file.txt.</p>\r
+<p>Also, note that a bare "git diff" shows the changes to file.txt, but\r
+not the addition of closing.txt, because the version of closing.txt\r
+in the index file is identical to the one in the working directory.</p>\r
+<p>In addition to being the staging area for new commits, the index file\r
+is also populated from the object database when checking out a\r
+branch, and is used to hold the trees involved in a merge operation.\r
+See the <a href="core-tutorial.html">core tutorial</a> and the relevant man\r
+pages for details.</p>\r
+</div>\r
+<h2>What next?</h2>\r
+<div class="sectionbody">\r
+<p>At this point you should know everything necessary to read the man\r
+pages for any of the git commands; one good place to start would be\r
+with the commands mentioned in <a href="everyday.html">Everyday git</a>. You\r
+should be able to find any unknown jargon in the\r
+<a href="glossary.html">Glossary</a>.</p>\r
+<p>The <a href="user-manual.html">Git User's Manual</a> provides a more\r
+comprehensive introduction to git.</p>\r
+<p>The <a href="gitcvs-migration.html">gitcvs-migration(7)</a>[CVS migration] document explains how to\r
+import a CVS repository into git, and shows how to use git in a\r
+CVS-like way.</p>\r
+<p>For some interesting examples of git use, see the\r
+<a href="howto-index.html">howtos</a>.</p>\r
+<p>For git developers, the <a href="core-tutorial.html">Core tutorial</a> goes\r
+into detail on the lower-level git mechanisms involved in, for\r
+example, creating a new commit.</p>\r
+</div>\r
+<h2>SEE ALSO</h2>\r
+<div class="sectionbody">\r
+<p><a href="gittutorial.html">gittutorial(7)</a>,\r
+<a href="gitcvs-migration.html">gitcvs-migration(7)</a>,\r
+<a href="everyday.html">Everyday git</a>,\r
+<a href="user-manual.html">The Git User's Manual</a></p>\r
+</div>\r
+<h2>GIT</h2>\r
+<div class="sectionbody">\r
+<p>Part of the <a href="git.html">git(7)</a> suite.</p>\r
+</div>\r
+<div id="footer">\r
+<div id="footer-text">\r
+Last updated 26-May-2008 01:14:51 UTC\r
+</div>\r
+</div>\r
+</body>\r
+</html>\r
-A tutorial introduction to git: part two
-========================================
+gittutorial-2(7)
+================
-You should work through link:tutorial.html[A tutorial introduction to
+NAME
+----
+gittutorial-2 - A tutorial introduction to git: part two
+
+SYNOPSIS
+--------
+git *
+
+DESCRIPTION
+-----------
+
+You should work through linkgit:gittutorial[7][A tutorial introduction to
git] before reading this tutorial.
The goal of this tutorial is to introduce two fundamental pieces of
The link:user-manual.html[Git User's Manual] provides a more
comprehensive introduction to git.
-The link:cvs-migration.html[CVS migration] document explains how to
+The linkgit:gitcvs-migration[7][CVS migration] document explains how to
import a CVS repository into git, and shows how to use git in a
CVS-like way.
For git developers, the link:core-tutorial.html[Core tutorial] goes
into detail on the lower-level git mechanisms involved in, for
example, creating a new commit.
+
+SEE ALSO
+--------
+linkgit:gittutorial[7],
+linkgit:gitcvs-migration[7],
+link:everyday.html[Everyday git],
+link:user-manual.html[The Git User's Manual]
+
+GIT
+---
+Part of the linkgit:git[7] suite.
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
+<meta name="generator" content="AsciiDoc 7.0.2" />\r
+<style type="text/css">\r
+/* Debug borders */\r
+p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
+/*\r
+ border: 1px solid red;\r
+*/\r
+}\r
+\r
+body {\r
+ margin: 1em 5% 1em 5%;\r
+}\r
+\r
+a { color: blue; }\r
+a:visited { color: fuchsia; }\r
+\r
+em {\r
+ font-style: italic;\r
+}\r
+\r
+strong {\r
+ font-weight: bold;\r
+}\r
+\r
+tt {\r
+ color: navy;\r
+}\r
+\r
+h1, h2, h3, h4, h5, h6 {\r
+ color: #527bbd;\r
+ font-family: sans-serif;\r
+ margin-top: 1.2em;\r
+ margin-bottom: 0.5em;\r
+ line-height: 1.3;\r
+}\r
+\r
+h1 {\r
+ border-bottom: 2px solid silver;\r
+}\r
+h2 {\r
+ border-bottom: 2px solid silver;\r
+ padding-top: 0.5em;\r
+}\r
+\r
+div.sectionbody {\r
+ font-family: serif;\r
+ margin-left: 0;\r
+}\r
+\r
+hr {\r
+ border: 1px solid silver;\r
+}\r
+\r
+p {\r
+ margin-top: 0.5em;\r
+ margin-bottom: 0.5em;\r
+}\r
+\r
+pre {\r
+ padding: 0;\r
+ margin: 0;\r
+}\r
+\r
+span#author {\r
+ color: #527bbd;\r
+ font-family: sans-serif;\r
+ font-weight: bold;\r
+ font-size: 1.2em;\r
+}\r
+span#email {\r
+}\r
+span#revision {\r
+ font-family: sans-serif;\r
+}\r
+\r
+div#footer {\r
+ font-family: sans-serif;\r
+ font-size: small;\r
+ border-top: 2px solid silver;\r
+ padding-top: 0.5em;\r
+ margin-top: 4.0em;\r
+}\r
+div#footer-text {\r
+ float: left;\r
+ padding-bottom: 0.5em;\r
+}\r
+div#footer-badges {\r
+ float: right;\r
+ padding-bottom: 0.5em;\r
+}\r
+\r
+div#preamble,\r
+div.tableblock, div.imageblock, div.exampleblock, div.verseblock,\r
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,\r
+div.admonitionblock {\r
+ margin-right: 10%;\r
+ margin-top: 1.5em;\r
+ margin-bottom: 1.5em;\r
+}\r
+div.admonitionblock {\r
+ margin-top: 2.5em;\r
+ margin-bottom: 2.5em;\r
+}\r
+\r
+div.content { /* Block element content. */\r
+ padding: 0;\r
+}\r
+\r
+/* Block element titles. */\r
+div.title, caption.title {\r
+ font-family: sans-serif;\r
+ font-weight: bold;\r
+ text-align: left;\r
+ margin-top: 1.0em;\r
+ margin-bottom: 0.5em;\r
+}\r
+div.title + * {\r
+ margin-top: 0;\r
+}\r
+\r
+td div.title:first-child {\r
+ margin-top: 0.0em;\r
+}\r
+div.content div.title:first-child {\r
+ margin-top: 0.0em;\r
+}\r
+div.content + div.title {\r
+ margin-top: 0.0em;\r
+}\r
+\r
+div.sidebarblock > div.content {\r
+ background: #ffffee;\r
+ border: 1px solid silver;\r
+ padding: 0.5em;\r
+}\r
+\r
+div.listingblock > div.content {\r
+ border: 1px solid silver;\r
+ background: #f4f4f4;\r
+ padding: 0.5em;\r
+}\r
+\r
+div.quoteblock > div.content {\r
+ padding-left: 2.0em;\r
+}\r
+div.quoteblock .attribution {\r
+ text-align: right;\r
+}\r
+\r
+div.admonitionblock .icon {\r
+ vertical-align: top;\r
+ font-size: 1.1em;\r
+ font-weight: bold;\r
+ text-decoration: underline;\r
+ color: #527bbd;\r
+ padding-right: 0.5em;\r
+}\r
+div.admonitionblock td.content {\r
+ padding-left: 0.5em;\r
+ border-left: 2px solid silver;\r
+}\r
+\r
+div.exampleblock > div.content {\r
+ border-left: 2px solid silver;\r
+ padding: 0.5em;\r
+}\r
+\r
+div.verseblock div.content {\r
+ white-space: pre;\r
+}\r
+\r
+div.imageblock div.content { padding-left: 0; }\r
+div.imageblock img { border: 1px solid silver; }\r
+span.image img { border-style: none; }\r
+\r
+dl {\r
+ margin-top: 0.8em;\r
+ margin-bottom: 0.8em;\r
+}\r
+dt {\r
+ margin-top: 0.5em;\r
+ margin-bottom: 0;\r
+ font-style: italic;\r
+}\r
+dd > *:first-child {\r
+ margin-top: 0;\r
+}\r
+\r
+ul, ol {\r
+ list-style-position: outside;\r
+}\r
+ol.olist2 {\r
+ list-style-type: lower-alpha;\r
+}\r
+\r
+div.tableblock > table {\r
+ border-color: #527bbd;\r
+ border-width: 3px;\r
+}\r
+thead {\r
+ font-family: sans-serif;\r
+ font-weight: bold;\r
+}\r
+tfoot {\r
+ font-weight: bold;\r
+}\r
+\r
+div.hlist {\r
+ margin-top: 0.8em;\r
+ margin-bottom: 0.8em;\r
+}\r
+td.hlist1 {\r
+ vertical-align: top;\r
+ font-style: italic;\r
+ padding-right: 0.8em;\r
+}\r
+td.hlist2 {\r
+ vertical-align: top;\r
+}\r
+\r
+@media print {\r
+ div#footer-badges { display: none; }\r
+}\r
+include::./stylesheets/xhtml11-manpage.css[]\r
+/* Workarounds for IE6's broken and incomplete CSS2. */\r
+\r
+div.sidebar-content {\r
+ background: #ffffee;\r
+ border: 1px solid silver;\r
+ padding: 0.5em;\r
+}\r
+div.sidebar-title, div.image-title {\r
+ font-family: sans-serif;\r
+ font-weight: bold;\r
+ margin-top: 0.0em;\r
+ margin-bottom: 0.5em;\r
+}\r
+\r
+div.listingblock div.content {\r
+ border: 1px solid silver;\r
+ background: #f4f4f4;\r
+ padding: 0.5em;\r
+}\r
+\r
+div.quoteblock-content {\r
+ padding-left: 2.0em;\r
+}\r
+\r
+div.exampleblock-content {\r
+ border-left: 2px solid silver;\r
+ padding-left: 0.5em;\r
+}\r
+</style>\r
+<title>gittutorial(7)</title>\r
+</head>\r
+<body>\r
+<div id="header">\r
+<h1>\r
+gittutorial(7) Manual Page\r
+</h1>\r
+<h2>NAME</h2>\r
+<div class="sectionbody">\r
+<p>gittutorial -\r
+ A tutorial introduction to git (for version 1.5.1 or newer)\r
+</p>\r
+</div>\r
+</div>\r
+<h2>SYNOPSIS</h2>\r
+<div class="sectionbody">\r
+<p>git *</p>\r
+</div>\r
+<h2>DESCRIPTION</h2>\r
+<div class="sectionbody">\r
+<p>This tutorial explains how to import a new project into git, make\r
+changes to it, and share changes with other developers.</p>\r
+<p>If you are instead primarily interested in using git to fetch a project,\r
+for example, to test the latest version, you may prefer to start with\r
+the first two chapters of <a href="user-manual.html">The Git User's Manual</a>.</p>\r
+<p>First, note that you can get documentation for a command such as "git\r
+diff" with:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ man git-diff</tt></pre>\r
+</div></div>\r
+<p>It is a good idea to introduce yourself to git with your name and\r
+public email address before doing any operation. The easiest\r
+way to do so is:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git config --global user.name "Your Name Comes Here"\r
+$ git config --global user.email you@yourdomain.example.com</tt></pre>\r
+</div></div>\r
+</div>\r
+<h2>Importing a new project</h2>\r
+<div class="sectionbody">\r
+<p>Assume you have a tarball project.tar.gz with your initial work. You\r
+can place it under git revision control as follows.</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ tar xzf project.tar.gz\r
+$ cd project\r
+$ git init</tt></pre>\r
+</div></div>\r
+<p>Git will reply</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>Initialized empty Git repository in .git/</tt></pre>\r
+</div></div>\r
+<p>You've now initialized the working directory--you may notice a new\r
+directory created, named ".git".</p>\r
+<p>Next, tell git to take a snapshot of the contents of all files under the\r
+current directory (note the <em>.</em>), with <a href="git-add.html">git-add(1)</a>:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git add .</tt></pre>\r
+</div></div>\r
+<p>This snapshot is now stored in a temporary staging area which git calls\r
+the "index". You can permanently store the contents of the index in the\r
+repository with <a href="git-commit.html">git-commit(1)</a>:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git commit</tt></pre>\r
+</div></div>\r
+<p>This will prompt you for a commit message. You've now stored the first\r
+version of your project in git.</p>\r
+</div>\r
+<h2>Making changes</h2>\r
+<div class="sectionbody">\r
+<p>Modify some files, then add their updated contents to the index:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git add file1 file2 file3</tt></pre>\r
+</div></div>\r
+<p>You are now ready to commit. You can see what is about to be committed\r
+using <a href="git-diff.html">git-diff(1)</a> with the --cached option:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git diff --cached</tt></pre>\r
+</div></div>\r
+<p>(Without --cached, <a href="git-diff.html">git-diff(1)</a> will show you any changes that\r
+you've made but not yet added to the index.) You can also get a brief\r
+summary of the situation with <a href="git-status.html">git-status(1)</a>:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git status\r
+# On branch master\r
+# Changes to be committed:\r
+# (use "git reset HEAD <file>..." to unstage)\r
+#\r
+# modified: file1\r
+# modified: file2\r
+# modified: file3\r
+#</tt></pre>\r
+</div></div>\r
+<p>If you need to make any further adjustments, do so now, and then add any\r
+newly modified content to the index. Finally, commit your changes with:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git commit</tt></pre>\r
+</div></div>\r
+<p>This will again prompt your for a message describing the change, and then\r
+record a new version of the project.</p>\r
+<p>Alternatively, instead of running <tt>git add</tt> beforehand, you can use</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git commit -a</tt></pre>\r
+</div></div>\r
+<p>which will automatically notice any modified (but not new) files, add\r
+them to the index, and commit, all in one step.</p>\r
+<p>A note on commit messages: Though not required, it's a good idea to\r
+begin the commit message with a single short (less than 50 character)\r
+line summarizing the change, followed by a blank line and then a more\r
+thorough description. Tools that turn commits into email, for\r
+example, use the first line on the Subject: line and the rest of the\r
+commit in the body.</p>\r
+</div>\r
+<h2>Git tracks content not files</h2>\r
+<div class="sectionbody">\r
+<p>Many revision control systems provide an "add" command that tells the\r
+system to start tracking changes to a new file. Git's "add" command\r
+does something simpler and more powerful: <tt>git add</tt> is used both for new\r
+and newly modified files, and in both cases it takes a snapshot of the\r
+given files and stages that content in the index, ready for inclusion in\r
+the next commit.</p>\r
+</div>\r
+<h2>Viewing project history</h2>\r
+<div class="sectionbody">\r
+<p>At any point you can view the history of your changes using</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git log</tt></pre>\r
+</div></div>\r
+<p>If you also want to see complete diffs at each step, use</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git log -p</tt></pre>\r
+</div></div>\r
+<p>Often the overview of the change is useful to get a feel of\r
+each step</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git log --stat --summary</tt></pre>\r
+</div></div>\r
+</div>\r
+<h2>Managing branches</h2>\r
+<div class="sectionbody">\r
+<p>A single git repository can maintain multiple branches of\r
+development. To create a new branch named "experimental", use</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git branch experimental</tt></pre>\r
+</div></div>\r
+<p>If you now run</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git branch</tt></pre>\r
+</div></div>\r
+<p>you'll get a list of all existing branches:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt> experimental\r
+* master</tt></pre>\r
+</div></div>\r
+<p>The "experimental" branch is the one you just created, and the\r
+"master" branch is a default branch that was created for you\r
+automatically. The asterisk marks the branch you are currently on;\r
+type</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git checkout experimental</tt></pre>\r
+</div></div>\r
+<p>to switch to the experimental branch. Now edit a file, commit the\r
+change, and switch back to the master branch:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>(edit file)\r
+$ git commit -a\r
+$ git checkout master</tt></pre>\r
+</div></div>\r
+<p>Check that the change you made is no longer visible, since it was\r
+made on the experimental branch and you're back on the master branch.</p>\r
+<p>You can make a different change on the master branch:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>(edit file)\r
+$ git commit -a</tt></pre>\r
+</div></div>\r
+<p>at this point the two branches have diverged, with different changes\r
+made in each. To merge the changes made in experimental into master, run</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git merge experimental</tt></pre>\r
+</div></div>\r
+<p>If the changes don't conflict, you're done. If there are conflicts,\r
+markers will be left in the problematic files showing the conflict;</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git diff</tt></pre>\r
+</div></div>\r
+<p>will show this. Once you've edited the files to resolve the\r
+conflicts,</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git commit -a</tt></pre>\r
+</div></div>\r
+<p>will commit the result of the merge. Finally,</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ gitk</tt></pre>\r
+</div></div>\r
+<p>will show a nice graphical representation of the resulting history.</p>\r
+<p>At this point you could delete the experimental branch with</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git branch -d experimental</tt></pre>\r
+</div></div>\r
+<p>This command ensures that the changes in the experimental branch are\r
+already in the current branch.</p>\r
+<p>If you develop on a branch crazy-idea, then regret it, you can always\r
+delete the branch with</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git branch -D crazy-idea</tt></pre>\r
+</div></div>\r
+<p>Branches are cheap and easy, so this is a good way to try something\r
+out.</p>\r
+</div>\r
+<h2>Using git for collaboration</h2>\r
+<div class="sectionbody">\r
+<p>Suppose that Alice has started a new project with a git repository in\r
+/home/alice/project, and that Bob, who has a home directory on the\r
+same machine, wants to contribute.</p>\r
+<p>Bob begins with:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git clone /home/alice/project myrepo</tt></pre>\r
+</div></div>\r
+<p>This creates a new directory "myrepo" containing a clone of Alice's\r
+repository. The clone is on an equal footing with the original\r
+project, possessing its own copy of the original project's history.</p>\r
+<p>Bob then makes some changes and commits them:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>(edit files)\r
+$ git commit -a\r
+(repeat as necessary)</tt></pre>\r
+</div></div>\r
+<p>When he's ready, he tells Alice to pull changes from the repository\r
+at /home/bob/myrepo. She does this with:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ cd /home/alice/project\r
+$ git pull /home/bob/myrepo master</tt></pre>\r
+</div></div>\r
+<p>This merges the changes from Bob's "master" branch into Alice's\r
+current branch. If Alice has made her own changes in the meantime,\r
+then she may need to manually fix any conflicts. (Note that the\r
+"master" argument in the above command is actually unnecessary, as it\r
+is the default.)</p>\r
+<p>The "pull" command thus performs two operations: it fetches changes\r
+from a remote branch, then merges them into the current branch.</p>\r
+<p>When you are working in a small closely knit group, it is not\r
+unusual to interact with the same repository over and over\r
+again. By defining <em>remote</em> repository shorthand, you can make\r
+it easier:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git remote add bob /home/bob/myrepo</tt></pre>\r
+</div></div>\r
+<p>With this, Alice can perform the first operation alone using the\r
+"git fetch" command without merging them with her own branch,\r
+using:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git fetch bob</tt></pre>\r
+</div></div>\r
+<p>Unlike the longhand form, when Alice fetches from Bob using a\r
+remote repository shorthand set up with <tt>git remote</tt>, what was\r
+fetched is stored in a remote tracking branch, in this case\r
+<tt>bob/master</tt>. So after this:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git log -p master..bob/master</tt></pre>\r
+</div></div>\r
+<p>shows a list of all the changes that Bob made since he branched from\r
+Alice's master branch.</p>\r
+<p>After examining those changes, Alice\r
+could merge the changes into her master branch:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git merge bob/master</tt></pre>\r
+</div></div>\r
+<p>This <tt>merge</tt> can also be done by <em>pulling from her own remote\r
+tracking branch</em>, like this:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git pull . remotes/bob/master</tt></pre>\r
+</div></div>\r
+<p>Note that git pull always merges into the current branch,\r
+regardless of what else is given on the command line.</p>\r
+<p>Later, Bob can update his repo with Alice's latest changes using</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git pull</tt></pre>\r
+</div></div>\r
+<p>Note that he doesn't need to give the path to Alice's repository;\r
+when Bob cloned Alice's repository, git stored the location of her\r
+repository in the repository configuration, and that location is\r
+used for pulls:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git config --get remote.origin.url\r
+/home/alice/project</tt></pre>\r
+</div></div>\r
+<p>(The complete configuration created by git-clone is visible using\r
+"git config -l", and the <a href="git-config.html">git-config(1)</a> man page\r
+explains the meaning of each option.)</p>\r
+<p>Git also keeps a pristine copy of Alice's master branch under the\r
+name "origin/master":</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git branch -r\r
+ origin/master</tt></pre>\r
+</div></div>\r
+<p>If Bob later decides to work from a different host, he can still\r
+perform clones and pulls using the ssh protocol:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git clone alice.org:/home/alice/project myrepo</tt></pre>\r
+</div></div>\r
+<p>Alternatively, git has a native protocol, or can use rsync or http;\r
+see <a href="git-pull.html">git-pull(1)</a> for details.</p>\r
+<p>Git can also be used in a CVS-like mode, with a central repository\r
+that various users push changes to; see <a href="git-push.html">git-push(1)</a> and\r
+<a href="gitcvs-migration.html">gitcvs-migration(7)</a>[git for CVS users].</p>\r
+</div>\r
+<h2>Exploring history</h2>\r
+<div class="sectionbody">\r
+<p>Git history is represented as a series of interrelated commits. We\r
+have already seen that the git log command can list those commits.\r
+Note that first line of each git log entry also gives a name for the\r
+commit:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git log\r
+commit c82a22c39cbc32576f64f5c6b3f24b99ea8149c7\r
+Author: Junio C Hamano <junkio@cox.net>\r
+Date: Tue May 16 17:18:22 2006 -0700\r
+\r
+ merge-base: Clarify the comments on post processing.</tt></pre>\r
+</div></div>\r
+<p>We can give this name to git show to see the details about this\r
+commit.</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git show c82a22c39cbc32576f64f5c6b3f24b99ea8149c7</tt></pre>\r
+</div></div>\r
+<p>But there are other ways to refer to commits. You can use any initial\r
+part of the name that is long enough to uniquely identify the commit:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git show c82a22c39c # the first few characters of the name are\r
+ # usually enough\r
+$ git show HEAD # the tip of the current branch\r
+$ git show experimental # the tip of the "experimental" branch</tt></pre>\r
+</div></div>\r
+<p>Every commit usually has one "parent" commit\r
+which points to the previous state of the project:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git show HEAD^ # to see the parent of HEAD\r
+$ git show HEAD^^ # to see the grandparent of HEAD\r
+$ git show HEAD~4 # to see the great-great grandparent of HEAD</tt></pre>\r
+</div></div>\r
+<p>Note that merge commits may have more than one parent:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git show HEAD^1 # show the first parent of HEAD (same as HEAD^)\r
+$ git show HEAD^2 # show the second parent of HEAD</tt></pre>\r
+</div></div>\r
+<p>You can also give commits names of your own; after running</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git-tag v2.5 1b2e1d63ff</tt></pre>\r
+</div></div>\r
+<p>you can refer to 1b2e1d63ff by the name "v2.5". If you intend to\r
+share this name with other people (for example, to identify a release\r
+version), you should create a "tag" object, and perhaps sign it; see\r
+<a href="git-tag.html">git-tag(1)</a> for details.</p>\r
+<p>Any git command that needs to know a commit can take any of these\r
+names. For example:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git diff v2.5 HEAD # compare the current HEAD to v2.5\r
+$ git branch stable v2.5 # start a new branch named "stable" based\r
+ # at v2.5\r
+$ git reset --hard HEAD^ # reset your current branch and working\r
+ # directory to its state at HEAD^</tt></pre>\r
+</div></div>\r
+<p>Be careful with that last command: in addition to losing any changes\r
+in the working directory, it will also remove all later commits from\r
+this branch. If this branch is the only branch containing those\r
+commits, they will be lost. Also, don't use "git reset" on a\r
+publicly-visible branch that other developers pull from, as it will\r
+force needless merges on other developers to clean up the history.\r
+If you need to undo changes that you have pushed, use <a href="git-revert.html">git-revert(1)</a>\r
+instead.</p>\r
+<p>The git grep command can search for strings in any version of your\r
+project, so</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git grep "hello" v2.5</tt></pre>\r
+</div></div>\r
+<p>searches for all occurrences of "hello" in v2.5.</p>\r
+<p>If you leave out the commit name, git grep will search any of the\r
+files it manages in your current directory. So</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git grep "hello"</tt></pre>\r
+</div></div>\r
+<p>is a quick way to search just the files that are tracked by git.</p>\r
+<p>Many git commands also take sets of commits, which can be specified\r
+in a number of ways. Here are some examples with git log:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git log v2.5..v2.6 # commits between v2.5 and v2.6\r
+$ git log v2.5.. # commits since v2.5\r
+$ git log --since="2 weeks ago" # commits from the last 2 weeks\r
+$ git log v2.5.. Makefile # commits since v2.5 which modify\r
+ # Makefile</tt></pre>\r
+</div></div>\r
+<p>You can also give git log a "range" of commits where the first is not\r
+necessarily an ancestor of the second; for example, if the tips of\r
+the branches "stable-release" and "master" diverged from a common\r
+commit some time ago, then</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git log stable..experimental</tt></pre>\r
+</div></div>\r
+<p>will list commits made in the experimental branch but not in the\r
+stable branch, while</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git log experimental..stable</tt></pre>\r
+</div></div>\r
+<p>will show the list of commits made on the stable branch but not\r
+the experimental branch.</p>\r
+<p>The "git log" command has a weakness: it must present commits in a\r
+list. When the history has lines of development that diverged and\r
+then merged back together, the order in which "git log" presents\r
+those commits is meaningless.</p>\r
+<p>Most projects with multiple contributors (such as the linux kernel,\r
+or git itself) have frequent merges, and gitk does a better job of\r
+visualizing their history. For example,</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ gitk --since="2 weeks ago" drivers/</tt></pre>\r
+</div></div>\r
+<p>allows you to browse any commits from the last 2 weeks of commits\r
+that modified files under the "drivers" directory. (Note: you can\r
+adjust gitk's fonts by holding down the control key while pressing\r
+"-" or "+".)</p>\r
+<p>Finally, most commands that take filenames will optionally allow you\r
+to precede any filename by a commit, to specify a particular version\r
+of the file:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git diff v2.5:Makefile HEAD:Makefile.in</tt></pre>\r
+</div></div>\r
+<p>You can also use "git show" to see any such file:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git show v2.5:Makefile</tt></pre>\r
+</div></div>\r
+</div>\r
+<h2>Next Steps</h2>\r
+<div class="sectionbody">\r
+<p>This tutorial should be enough to perform basic distributed revision\r
+control for your projects. However, to fully understand the depth\r
+and power of git you need to understand two simple ideas on which it\r
+is based:</p>\r
+<ul>\r
+<li>\r
+<p>\r
+The object database is the rather elegant system used to\r
+ store the history of your project--files, directories, and\r
+ commits.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+The index file is a cache of the state of a directory tree,\r
+ used to create commits, check out working directories, and\r
+ hold the various trees involved in a merge.\r
+</p>\r
+</li>\r
+</ul>\r
+<p><a href="gittutorial-2.html">gittutorial-2(7)</a>[Part two of this tutorial] explains the object\r
+database, the index file, and a few other odds and ends that you'll\r
+need to make the most of git.</p>\r
+<p>If you don't want to continue with that right away, a few other\r
+digressions that may be interesting at this point are:</p>\r
+<ul>\r
+<li>\r
+<p>\r
+<a href="git-format-patch.html">git-format-patch(1)</a>, <a href="git-am.html">git-am(1)</a>: These convert\r
+ series of git commits into emailed patches, and vice versa,\r
+ useful for projects such as the linux kernel which rely heavily\r
+ on emailed patches.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+<a href="git-bisect.html">git-bisect(1)</a>: When there is a regression in your\r
+ project, one way to track down the bug is by searching through\r
+ the history to find the exact commit that's to blame. Git bisect\r
+ can help you perform a binary search for that commit. It is\r
+ smart enough to perform a close-to-optimal search even in the\r
+ case of complex non-linear history with lots of merged branches.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+<a href="everyday.html">Everyday GIT with 20 Commands Or So</a>\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+<a href="gitcvs-migration.html">gitcvs-migration(7)</a>[git for CVS users].\r
+</p>\r
+</li>\r
+</ul>\r
+</div>\r
+<h2>SEE ALSO</h2>\r
+<div class="sectionbody">\r
+<p><a href="gittutorial-2.html">gittutorial-2(7)</a>,\r
+<a href="gitcvs-migration.html">gitcvs-migration(7)</a>,\r
+<a href="everyday.html">Everyday git</a>,\r
+<a href="user-manual.html">The Git User's Manual</a></p>\r
+</div>\r
+<h2>GIT</h2>\r
+<div class="sectionbody">\r
+<p>Part of the <a href="git.html">git(7)</a> suite.</p>\r
+</div>\r
+<div id="footer">\r
+<div id="footer-text">\r
+Last updated 26-May-2008 01:14:50 UTC\r
+</div>\r
+</div>\r
+</body>\r
+</html>\r
-A tutorial introduction to git (for version 1.5.1 or newer)
-===========================================================
+gittutorial(7)
+==============
+
+NAME
+----
+gittutorial - A tutorial introduction to git (for version 1.5.1 or newer)
+
+SYNOPSIS
+--------
+git *
+
+DESCRIPTION
+-----------
This tutorial explains how to import a new project into git, make
changes to it, and share changes with other developers.
Git can also be used in a CVS-like mode, with a central repository
that various users push changes to; see linkgit:git-push[1] and
-link:cvs-migration.html[git for CVS users].
+linkgit:gitcvs-migration[7][git for CVS users].
Exploring history
-----------------
used to create commits, check out working directories, and
hold the various trees involved in a merge.
-link:tutorial-2.html[Part two of this tutorial] explains the object
+linkgit:gittutorial-2[7][Part two of this tutorial] explains the object
database, the index file, and a few other odds and ends that you'll
need to make the most of git.
* link:everyday.html[Everyday GIT with 20 Commands Or So]
- * link:cvs-migration.html[git for CVS users].
+ * linkgit:gitcvs-migration[7][git for CVS users].
+
+SEE ALSO
+--------
+linkgit:gittutorial-2[7],
+linkgit:gitcvs-migration[7],
+link:everyday.html[Everyday git],
+link:user-manual.html[The Git User's Manual]
+
+GIT
+---
+Part of the linkgit:git[7] suite.
<div class="listingblock">\r
<div class="content">\r
<pre><tt>struct commit *commit;\r
-struct git_graph *graph = graph_init();\r
+struct git_graph *graph = graph_init(opts);\r
\r
while ((commit = get_revision(opts)) != NULL) {\r
graph_update(graph, commit);\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 22-May-2008 00:52:48 UTC\r
+Last updated 26-May-2008 01:14:54 UTC\r
</div>\r
</div>\r
</body>\r
------------
struct commit *commit;
-struct git_graph *graph = graph_init();
+struct git_graph *graph = graph_init(opts);
while ((commit = get_revision(opts)) != NULL) {
graph_update(graph, commit);
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Git User's Manual (for version 1.5.3 or newer)</title><link rel="stylesheet" href="docbook-xsl.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id189136"></a>Git User's Manual (for version 1.5.3 or newer)</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#id264725">Preface</a></span></dt><dt><span class="chapter"><a href="#repositories-and-branches">1. Repositories and Branches</a></span></dt><dd><dl><dt><span class="section"><a href="#how-to-get-a-git-repository">How to get a git repository</a></span></dt><dt><span class="section"><a href="#how-to-check-out">How to check out a different version of a project</a></span></dt><dt><span class="section"><a href="#understanding-commits">Understanding History: Commits</a></span></dt><dd><dl><dt><span class="section"><a href="#understanding-reachability">Understanding history: commits, parents, and reachability</a></span></dt><dt><span class="section"><a href="#history-diagrams">Understanding history: History diagrams</a></span></dt><dt><span class="section"><a href="#what-is-a-branch">Understanding history: What is a branch?</a></span></dt></dl></dd><dt><span class="section"><a href="#manipulating-branches">Manipulating branches</a></span></dt><dt><span class="section"><a href="#detached-head">Examining an old version without creating a new branch</a></span></dt><dt><span class="section"><a href="#examining-remote-branches">Examining branches from a remote repository</a></span></dt><dt><span class="section"><a href="#how-git-stores-references">Naming branches, tags, and other references</a></span></dt><dt><span class="section"><a href="#Updating-a-repository-with-git-fetch">Updating a repository with git fetch</a></span></dt><dt><span class="section"><a href="#fetching-branches">Fetching branches from other repositories</a></span></dt></dl></dd><dt><span class="chapter"><a href="#exploring-git-history">2. Exploring git history</a></span></dt><dd><dl><dt><span class="section"><a href="#using-bisect">How to use bisect to find a regression</a></span></dt><dt><span class="section"><a href="#naming-commits">Naming commits</a></span></dt><dt><span class="section"><a href="#creating-tags">Creating tags</a></span></dt><dt><span class="section"><a href="#browsing-revisions">Browsing revisions</a></span></dt><dt><span class="section"><a href="#generating-diffs">Generating diffs</a></span></dt><dt><span class="section"><a href="#viewing-old-file-versions">Viewing old file versions</a></span></dt><dt><span class="section"><a href="#history-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#counting-commits-on-a-branch">Counting the number of commits on a branch</a></span></dt><dt><span class="section"><a href="#checking-for-equal-branches">Check whether two branches point at the same history</a></span></dt><dt><span class="section"><a href="#finding-tagged-descendants">Find first tagged version including a given fix</a></span></dt><dt><span class="section"><a href="#showing-commits-unique-to-a-branch">Showing commits unique to a given branch</a></span></dt><dt><span class="section"><a href="#making-a-release">Creating a changelog and tarball for a software release</a></span></dt><dt><span class="section"><a href="#Finding-comments-with-given-content">Finding commits referencing a file with given content</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#Developing-with-git">3. Developing with git</a></span></dt><dd><dl><dt><span class="section"><a href="#telling-git-your-name">Telling git your name</a></span></dt><dt><span class="section"><a href="#creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#how-to-make-a-commit">How to make a commit</a></span></dt><dt><span class="section"><a href="#creating-good-commit-messages">Creating good commit messages</a></span></dt><dt><span class="section"><a href="#ignoring-files">Ignoring files</a></span></dt><dt><span class="section"><a href="#how-to-merge">How to merge</a></span></dt><dt><span class="section"><a href="#resolving-a-merge">Resolving a merge</a></span></dt><dd><dl><dt><span class="section"><a href="#conflict-resolution">Getting conflict-resolution help during a merge</a></span></dt></dl></dd><dt><span class="section"><a href="#undoing-a-merge">Undoing a merge</a></span></dt><dt><span class="section"><a href="#fast-forwards">Fast-forward merges</a></span></dt><dt><span class="section"><a href="#fixing-mistakes">Fixing mistakes</a></span></dt><dd><dl><dt><span class="section"><a href="#reverting-a-commit">Fixing a mistake with a new commit</a></span></dt><dt><span class="section"><a href="#fixing-a-mistake-by-rewriting-history">Fixing a mistake by rewriting history</a></span></dt><dt><span class="section"><a href="#checkout-of-path">Checking out an old version of a file</a></span></dt><dt><span class="section"><a href="#interrupted-work">Temporarily setting aside work in progress</a></span></dt></dl></dd><dt><span class="section"><a href="#ensuring-good-performance">Ensuring good performance</a></span></dt><dt><span class="section"><a href="#ensuring-reliability">Ensuring reliability</a></span></dt><dd><dl><dt><span class="section"><a href="#checking-for-corruption">Checking the repository for corruption</a></span></dt><dt><span class="section"><a href="#recovering-lost-changes">Recovering lost changes</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#sharing-development">4. Sharing development with others</a></span></dt><dd><dl><dt><span class="section"><a href="#getting-updates-with-git-pull">Getting updates with git pull</a></span></dt><dt><span class="section"><a href="#submitting-patches">Submitting patches to a project</a></span></dt><dt><span class="section"><a href="#importing-patches">Importing patches to a project</a></span></dt><dt><span class="section"><a href="#public-repositories">Public git repositories</a></span></dt><dd><dl><dt><span class="section"><a href="#setting-up-a-public-repository">Setting up a public repository</a></span></dt><dt><span class="section"><a href="#exporting-via-git">Exporting a git repository via the git protocol</a></span></dt><dt><span class="section"><a href="#exporting-via-http">Exporting a git repository via http</a></span></dt><dt><span class="section"><a href="#pushing-changes-to-a-public-repository">Pushing changes to a public repository</a></span></dt><dt><span class="section"><a href="#forcing-push">What to do when a push fails</a></span></dt><dt><span class="section"><a href="#setting-up-a-shared-repository">Setting up a shared repository</a></span></dt><dt><span class="section"><a href="#setting-up-gitweb">Allowing web browsing of a repository</a></span></dt></dl></dd><dt><span class="section"><a href="#sharing-development-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#maintaining-topic-branches">Maintaining topic branches for a Linux subsystem maintainer</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#cleaning-up-history">5. Rewriting history and maintaining patch series</a></span></dt><dd><dl><dt><span class="section"><a href="#patch-series">Creating the perfect patch series</a></span></dt><dt><span class="section"><a href="#using-git-rebase">Keeping a patch series up to date using git-rebase</a></span></dt><dt><span class="section"><a href="#rewriting-one-commit">Rewriting a single commit</a></span></dt><dt><span class="section"><a href="#reordering-patch-series">Reordering or selecting from a patch series</a></span></dt><dt><span class="section"><a href="#patch-series-tools">Other tools</a></span></dt><dt><span class="section"><a href="#problems-with-rewriting-history">Problems with rewriting history</a></span></dt><dt><span class="section"><a href="#bisect-merges">Why bisecting merge commits can be harder than bisecting linear history</a></span></dt></dl></dd><dt><span class="chapter"><a href="#advanced-branch-management">6. Advanced branch management</a></span></dt><dd><dl><dt><span class="section"><a href="#fetching-individual-branches">Fetching individual branches</a></span></dt><dt><span class="section"><a href="#fetch-fast-forwards">git fetch and fast-forwards</a></span></dt><dt><span class="section"><a href="#forcing-fetch">Forcing git fetch to do non-fast-forward updates</a></span></dt><dt><span class="section"><a href="#remote-branch-configuration">Configuring remote branches</a></span></dt></dl></dd><dt><span class="chapter"><a href="#git-concepts">7. Git concepts</a></span></dt><dd><dl><dt><span class="section"><a href="#the-object-database">The Object Database</a></span></dt><dd><dl><dt><span class="section"><a href="#commit-object">Commit Object</a></span></dt><dt><span class="section"><a href="#tree-object">Tree Object</a></span></dt><dt><span class="section"><a href="#blob-object">Blob Object</a></span></dt><dt><span class="section"><a href="#trust">Trust</a></span></dt><dt><span class="section"><a href="#tag-object">Tag Object</a></span></dt><dt><span class="section"><a href="#pack-files">How git stores objects efficiently: pack files</a></span></dt><dt><span class="section"><a href="#dangling-objects">Dangling objects</a></span></dt><dt><span class="section"><a href="#recovering-from-repository-corruption">Recovering from repository corruption</a></span></dt></dl></dd><dt><span class="section"><a href="#the-index">The index</a></span></dt></dl></dd><dt><span class="chapter"><a href="#submodules">8. Submodules</a></span></dt><dd><dl><dt><span class="section"><a href="#id280266">Pitfalls with submodules</a></span></dt></dl></dd><dt><span class="chapter"><a href="#low-level-operations">9. Low-level git operations</a></span></dt><dd><dl><dt><span class="section"><a href="#object-manipulation">Object access and manipulation</a></span></dt><dt><span class="section"><a href="#the-workflow">The Workflow</a></span></dt><dd><dl><dt><span class="section"><a href="#working-directory-to-index">working directory -> index</a></span></dt><dt><span class="section"><a href="#index-to-object-database">index -> object database</a></span></dt><dt><span class="section"><a href="#object-database-to-index">object database -> index</a></span></dt><dt><span class="section"><a href="#index-to-working-directory">index -> working directory</a></span></dt><dt><span class="section"><a href="#tying-it-all-together">Tying it all together</a></span></dt></dl></dd><dt><span class="section"><a href="#examining-the-data">Examining the data</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees">Merging multiple trees</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees-2">Merging multiple trees, continued</a></span></dt></dl></dd><dt><span class="chapter"><a href="#hacking-git">10. Hacking git</a></span></dt><dd><dl><dt><span class="section"><a href="#object-details">Object storage format</a></span></dt><dt><span class="section"><a href="#birdview-on-the-source-code">A birds-eye view of Git's source code</a></span></dt></dl></dd><dt><span class="chapter"><a href="#glossary">11. GIT Glossary</a></span></dt><dt><span class="appendix"><a href="#git-quick-start">A. Git Quick Reference</a></span></dt><dd><dl><dt><span class="section"><a href="#quick-creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#managing-branches">Managing branches</a></span></dt><dt><span class="section"><a href="#exploring-history">Exploring history</a></span></dt><dt><span class="section"><a href="#making-changes">Making changes</a></span></dt><dt><span class="section"><a href="#merging">Merging</a></span></dt><dt><span class="section"><a href="#sharing-your-changes">Sharing your changes</a></span></dt><dt><span class="section"><a href="#repository-maintenance">Repository maintenance</a></span></dt></dl></dd><dt><span class="appendix"><a href="#todo">B. Notes and todo list for this manual</a></span></dt></dl></div><div class="preface" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id264725"></a>Preface</h2></div></div></div><p>Git is a fast distributed revision control system.</p><p>This manual is designed to be readable by someone with basic UNIX
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Git User's Manual (for version 1.5.3 or newer)</title><link rel="stylesheet" href="docbook-xsl.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id189136"></a>Git User's Manual (for version 1.5.3 or newer)</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#id264725">Preface</a></span></dt><dt><span class="chapter"><a href="#repositories-and-branches">1. Repositories and Branches</a></span></dt><dd><dl><dt><span class="section"><a href="#how-to-get-a-git-repository">How to get a git repository</a></span></dt><dt><span class="section"><a href="#how-to-check-out">How to check out a different version of a project</a></span></dt><dt><span class="section"><a href="#understanding-commits">Understanding History: Commits</a></span></dt><dd><dl><dt><span class="section"><a href="#understanding-reachability">Understanding history: commits, parents, and reachability</a></span></dt><dt><span class="section"><a href="#history-diagrams">Understanding history: History diagrams</a></span></dt><dt><span class="section"><a href="#what-is-a-branch">Understanding history: What is a branch?</a></span></dt></dl></dd><dt><span class="section"><a href="#manipulating-branches">Manipulating branches</a></span></dt><dt><span class="section"><a href="#detached-head">Examining an old version without creating a new branch</a></span></dt><dt><span class="section"><a href="#examining-remote-branches">Examining branches from a remote repository</a></span></dt><dt><span class="section"><a href="#how-git-stores-references">Naming branches, tags, and other references</a></span></dt><dt><span class="section"><a href="#Updating-a-repository-with-git-fetch">Updating a repository with git fetch</a></span></dt><dt><span class="section"><a href="#fetching-branches">Fetching branches from other repositories</a></span></dt></dl></dd><dt><span class="chapter"><a href="#exploring-git-history">2. Exploring git history</a></span></dt><dd><dl><dt><span class="section"><a href="#using-bisect">How to use bisect to find a regression</a></span></dt><dt><span class="section"><a href="#naming-commits">Naming commits</a></span></dt><dt><span class="section"><a href="#creating-tags">Creating tags</a></span></dt><dt><span class="section"><a href="#browsing-revisions">Browsing revisions</a></span></dt><dt><span class="section"><a href="#generating-diffs">Generating diffs</a></span></dt><dt><span class="section"><a href="#viewing-old-file-versions">Viewing old file versions</a></span></dt><dt><span class="section"><a href="#history-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#counting-commits-on-a-branch">Counting the number of commits on a branch</a></span></dt><dt><span class="section"><a href="#checking-for-equal-branches">Check whether two branches point at the same history</a></span></dt><dt><span class="section"><a href="#finding-tagged-descendants">Find first tagged version including a given fix</a></span></dt><dt><span class="section"><a href="#showing-commits-unique-to-a-branch">Showing commits unique to a given branch</a></span></dt><dt><span class="section"><a href="#making-a-release">Creating a changelog and tarball for a software release</a></span></dt><dt><span class="section"><a href="#Finding-comments-with-given-content">Finding commits referencing a file with given content</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#Developing-with-git">3. Developing with git</a></span></dt><dd><dl><dt><span class="section"><a href="#telling-git-your-name">Telling git your name</a></span></dt><dt><span class="section"><a href="#creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#how-to-make-a-commit">How to make a commit</a></span></dt><dt><span class="section"><a href="#creating-good-commit-messages">Creating good commit messages</a></span></dt><dt><span class="section"><a href="#ignoring-files">Ignoring files</a></span></dt><dt><span class="section"><a href="#how-to-merge">How to merge</a></span></dt><dt><span class="section"><a href="#resolving-a-merge">Resolving a merge</a></span></dt><dd><dl><dt><span class="section"><a href="#conflict-resolution">Getting conflict-resolution help during a merge</a></span></dt></dl></dd><dt><span class="section"><a href="#undoing-a-merge">Undoing a merge</a></span></dt><dt><span class="section"><a href="#fast-forwards">Fast-forward merges</a></span></dt><dt><span class="section"><a href="#fixing-mistakes">Fixing mistakes</a></span></dt><dd><dl><dt><span class="section"><a href="#reverting-a-commit">Fixing a mistake with a new commit</a></span></dt><dt><span class="section"><a href="#fixing-a-mistake-by-rewriting-history">Fixing a mistake by rewriting history</a></span></dt><dt><span class="section"><a href="#checkout-of-path">Checking out an old version of a file</a></span></dt><dt><span class="section"><a href="#interrupted-work">Temporarily setting aside work in progress</a></span></dt></dl></dd><dt><span class="section"><a href="#ensuring-good-performance">Ensuring good performance</a></span></dt><dt><span class="section"><a href="#ensuring-reliability">Ensuring reliability</a></span></dt><dd><dl><dt><span class="section"><a href="#checking-for-corruption">Checking the repository for corruption</a></span></dt><dt><span class="section"><a href="#recovering-lost-changes">Recovering lost changes</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#sharing-development">4. Sharing development with others</a></span></dt><dd><dl><dt><span class="section"><a href="#getting-updates-with-git-pull">Getting updates with git pull</a></span></dt><dt><span class="section"><a href="#submitting-patches">Submitting patches to a project</a></span></dt><dt><span class="section"><a href="#importing-patches">Importing patches to a project</a></span></dt><dt><span class="section"><a href="#public-repositories">Public git repositories</a></span></dt><dd><dl><dt><span class="section"><a href="#setting-up-a-public-repository">Setting up a public repository</a></span></dt><dt><span class="section"><a href="#exporting-via-git">Exporting a git repository via the git protocol</a></span></dt><dt><span class="section"><a href="#exporting-via-http">Exporting a git repository via http</a></span></dt><dt><span class="section"><a href="#pushing-changes-to-a-public-repository">Pushing changes to a public repository</a></span></dt><dt><span class="section"><a href="#forcing-push">What to do when a push fails</a></span></dt><dt><span class="section"><a href="#setting-up-a-shared-repository">Setting up a shared repository</a></span></dt><dt><span class="section"><a href="#setting-up-gitweb">Allowing web browsing of a repository</a></span></dt></dl></dd><dt><span class="section"><a href="#sharing-development-examples">Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#maintaining-topic-branches">Maintaining topic branches for a Linux subsystem maintainer</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#cleaning-up-history">5. Rewriting history and maintaining patch series</a></span></dt><dd><dl><dt><span class="section"><a href="#patch-series">Creating the perfect patch series</a></span></dt><dt><span class="section"><a href="#using-git-rebase">Keeping a patch series up to date using git-rebase</a></span></dt><dt><span class="section"><a href="#rewriting-one-commit">Rewriting a single commit</a></span></dt><dt><span class="section"><a href="#reordering-patch-series">Reordering or selecting from a patch series</a></span></dt><dt><span class="section"><a href="#patch-series-tools">Other tools</a></span></dt><dt><span class="section"><a href="#problems-with-rewriting-history">Problems with rewriting history</a></span></dt><dt><span class="section"><a href="#bisect-merges">Why bisecting merge commits can be harder than bisecting linear history</a></span></dt></dl></dd><dt><span class="chapter"><a href="#advanced-branch-management">6. Advanced branch management</a></span></dt><dd><dl><dt><span class="section"><a href="#fetching-individual-branches">Fetching individual branches</a></span></dt><dt><span class="section"><a href="#fetch-fast-forwards">git fetch and fast-forwards</a></span></dt><dt><span class="section"><a href="#forcing-fetch">Forcing git fetch to do non-fast-forward updates</a></span></dt><dt><span class="section"><a href="#remote-branch-configuration">Configuring remote branches</a></span></dt></dl></dd><dt><span class="chapter"><a href="#git-concepts">7. Git concepts</a></span></dt><dd><dl><dt><span class="section"><a href="#the-object-database">The Object Database</a></span></dt><dd><dl><dt><span class="section"><a href="#commit-object">Commit Object</a></span></dt><dt><span class="section"><a href="#tree-object">Tree Object</a></span></dt><dt><span class="section"><a href="#blob-object">Blob Object</a></span></dt><dt><span class="section"><a href="#trust">Trust</a></span></dt><dt><span class="section"><a href="#tag-object">Tag Object</a></span></dt><dt><span class="section"><a href="#pack-files">How git stores objects efficiently: pack files</a></span></dt><dt><span class="section"><a href="#dangling-objects">Dangling objects</a></span></dt><dt><span class="section"><a href="#recovering-from-repository-corruption">Recovering from repository corruption</a></span></dt></dl></dd><dt><span class="section"><a href="#the-index">The index</a></span></dt></dl></dd><dt><span class="chapter"><a href="#submodules">8. Submodules</a></span></dt><dd><dl><dt><span class="section"><a href="#id280265">Pitfalls with submodules</a></span></dt></dl></dd><dt><span class="chapter"><a href="#low-level-operations">9. Low-level git operations</a></span></dt><dd><dl><dt><span class="section"><a href="#object-manipulation">Object access and manipulation</a></span></dt><dt><span class="section"><a href="#the-workflow">The Workflow</a></span></dt><dd><dl><dt><span class="section"><a href="#working-directory-to-index">working directory -> index</a></span></dt><dt><span class="section"><a href="#index-to-object-database">index -> object database</a></span></dt><dt><span class="section"><a href="#object-database-to-index">object database -> index</a></span></dt><dt><span class="section"><a href="#index-to-working-directory">index -> working directory</a></span></dt><dt><span class="section"><a href="#tying-it-all-together">Tying it all together</a></span></dt></dl></dd><dt><span class="section"><a href="#examining-the-data">Examining the data</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees">Merging multiple trees</a></span></dt><dt><span class="section"><a href="#merging-multiple-trees-2">Merging multiple trees, continued</a></span></dt></dl></dd><dt><span class="chapter"><a href="#hacking-git">10. Hacking git</a></span></dt><dd><dl><dt><span class="section"><a href="#object-details">Object storage format</a></span></dt><dt><span class="section"><a href="#birdview-on-the-source-code">A birds-eye view of Git's source code</a></span></dt></dl></dd><dt><span class="chapter"><a href="#glossary">11. GIT Glossary</a></span></dt><dt><span class="appendix"><a href="#git-quick-start">A. Git Quick Reference</a></span></dt><dd><dl><dt><span class="section"><a href="#quick-creating-a-new-repository">Creating a new repository</a></span></dt><dt><span class="section"><a href="#managing-branches">Managing branches</a></span></dt><dt><span class="section"><a href="#exploring-history">Exploring history</a></span></dt><dt><span class="section"><a href="#making-changes">Making changes</a></span></dt><dt><span class="section"><a href="#merging">Merging</a></span></dt><dt><span class="section"><a href="#sharing-your-changes">Sharing your changes</a></span></dt><dt><span class="section"><a href="#repository-maintenance">Repository maintenance</a></span></dt></dl></dd><dt><span class="appendix"><a href="#todo">B. Notes and todo list for this manual</a></span></dt></dl></div><div class="preface" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id264725"></a>Preface</h2></div></div></div><p>Git is a fast distributed revision control system.</p><p>This manual is designed to be readable by someone with basic UNIX
command-line skills, but no previous knowledge of git.</p><p><a href="#repositories-and-branches" title="Chapter 1. Repositories and Branches">Chapter 1, <i>Repositories and Branches</i></a> and <a href="#exploring-git-history" title="Chapter 2. Exploring git history">Chapter 2, <i>Exploring git history</i></a> explain how
to fetch and study a project using git—read these chapters to learn how
to build and test a particular version of a software project, search for
solution is to retry the push after first updating your work by either a
pull or a fetch followed by a rebase; see the
<a href="#setting-up-a-shared-repository" title="Setting up a shared repository">next section</a> and
-<a href="cvs-migration.html" target="_top">git for CVS users</a> for more.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="setting-up-a-shared-repository"></a>Setting up a shared repository</h3></div></div></div><p>Another way to collaborate is by using a model similar to that
+<a href="gitcvs-migration.html" target="_top">gitcvs-migration(7)</a>[git for CVS users] for more.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="setting-up-a-shared-repository"></a>Setting up a shared repository</h3></div></div></div><p>Another way to collaborate is by using a model similar to that
commonly used in CVS, where several developers with special rights
all push to and pull from a single shared repository. See
-<a href="cvs-migration.html" target="_top">git for CVS users</a> for instructions on how to
+<a href="gitcvs-migration.html" target="_top">gitcvs-migration(7)</a>[git for CVS users] for instructions on how to
set this up.</p><p>However, while there is nothing wrong with git's support for shared
repositories, this mode of operation is not generally recommended,
simply because the mode of collaboration that git supports—by
number, and will take on values other than 0 for files with merge
conflicts.</p></li></ol></div><p>The index is thus a sort of temporary staging area, which is filled with
a tree which you are in the process of working on.</p><p>If you blow the index away entirely, you generally haven't lost any
-information as long as you have the name of the tree that it described.</p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="submodules"></a>Chapter 8. Submodules</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id280266">Pitfalls with submodules</a></span></dt></dl></div><p>Large projects are often composed of smaller, self-contained modules. For
+information as long as you have the name of the tree that it described.</p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="submodules"></a>Chapter 8. Submodules</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#id280265">Pitfalls with submodules</a></span></dt></dl></div><p>Large projects are often composed of smaller, self-contained modules. For
example, an embedded Linux distribution's source tree would include every
piece of software in the distribution with some local modifications; a movie
player might need to build against a specific, known-working version of a
$ git add a<br>
$ git commit -m "Updated submodule a."<br>
$ git push</p></div><p>You have to run <code class="literal">git submodule update</code> after <code class="literal">git pull</code> if you want to update
-submodules, too.</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id280266"></a>Pitfalls with submodules</h2></div></div></div><p>Always publish the submodule change before publishing the change to the
+submodules, too.</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id280265"></a>Pitfalls with submodules</h2></div></div></div><p>Always publish the submodule change before publishing the change to the
superproject that references it. If you forget to publish the submodule change,
others won't be able to clone the repository:</p><div class="literallayout"><p>$ cd ~/git/super/a<br>
$ echo i added another line to this file >> a.txt<br>
solution is to retry the push after first updating your work by either a
pull or a fetch followed by a rebase; see the
<<setting-up-a-shared-repository,next section>> and
-link:cvs-migration.html[git for CVS users] for more.
+linkgit:gitcvs-migration[7][git for CVS users] for more.
[[setting-up-a-shared-repository]]
Setting up a shared repository
Another way to collaborate is by using a model similar to that
commonly used in CVS, where several developers with special rights
all push to and pull from a single shared repository. See
-link:cvs-migration.html[git for CVS users] for instructions on how to
+linkgit:gitcvs-migration[7][git for CVS users] for instructions on how to
set this up.
However, while there is nothing wrong with git's support for shared