Autogenerated HTML docs for v1.6.0-rc1-27-g9b6bf
authorJunio C Hamano <junio@hera.kernel.org>
Wed, 30 Jul 2008 18:31:35 +0000 (18:31 +0000)
committerJunio C Hamano <junio@hera.kernel.org>
Wed, 30 Jul 2008 18:31:35 +0000 (18:31 +0000)
git-fast-export.html
git-fast-export.txt
git-push.html
git-push.txt
git-rev-parse.html
git-rev-parse.txt
git-svn.html
git-svn.txt
user-manual.html
user-manual.txt

index 717496097fb94e94cb0c486a260a6a2d8fc0d491..06540680e0d77fc2c8f8649911e8a642e337f2a9 100644 (file)
@@ -357,6 +357,21 @@ unsigned, with <em>verbatim</em>, they will be silently exported
 and with <em>warn</em>, they will be exported, but you will see a warning.</p></div>\r
 </dd>\r
 <dt>\r
+-M\r
+</dt>\r
+<dt>\r
+-C\r
+</dt>\r
+<dd>\r
+<p>\r
+        Perform move and/or copy detection, as described in the\r
+        <a href="git-diff.html">git-diff(1)</a> manual page, and use it to generate\r
+        rename and copy commands in the output dump.\r
+</p>\r
+<div class="para"><p>Note that earlier versions of this command did not complain and\r
+produced incorrect results if you gave these options.</p></div>\r
+</dd>\r
+<dt>\r
 --export-marks=&lt;file&gt;\r
 </dt>\r
 <dd>\r
@@ -428,7 +443,7 @@ a tag referencing a tree instead of a commit.</p></div>
 </div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 2008-07-06 05:16:44 UTC\r
+Last updated 2008-07-30 18:31:05 UTC\r
 </div>\r
 </div>\r
 </body>\r
index 4956964d857fd27d27fbff54de724623b79286db..b974e2115b01f17f0ac809b691baf2f4e4d32169 100644 (file)
@@ -36,6 +36,15 @@ when encountering a signed tag.  With 'strip', the tags will be made
 unsigned, with 'verbatim', they will be silently exported
 and with 'warn', they will be exported, but you will see a warning.
 
+-M::
+-C::
+       Perform move and/or copy detection, as described in the
+       linkgit:git-diff[1] manual page, and use it to generate
+       rename and copy commands in the output dump.
++
+Note that earlier versions of this command did not complain and
+produced incorrect results if you gave these options.
+
 --export-marks=<file>::
        Dumps the internal marks table to <file> when complete.
        Marks are written one per line as `:markid SHA-1`. Only marks
index bf542f586e29a27c3868d6c6bd6a276a6920798b..844940f322596f4f8dc41827582e7c5215f5defd 100644 (file)
@@ -322,7 +322,8 @@ git-push(1) Manual Page
 <div class="sectionbody">\r
 <div class="verseblock">\r
 <div class="content"><em>git push</em> [--all] [--dry-run] [--tags] [--receive-pack=&lt;git-receive-pack&gt;]\r
-           [--repo=all] [-f | --force] [-v | --verbose] [&lt;repository&gt; &lt;refspec&gt;&#8230;]</div></div>\r
+           [--repo=all] [-f | --force] [-v | --verbose]\r
+           [&lt;repository&gt; &lt;refspec&gt;&#8230;]</div></div>\r
 </div>\r
 <h2 id="_description">DESCRIPTION</h2>\r
 <div class="sectionbody">\r
@@ -345,11 +346,11 @@ documentation for <a href="git-receive-pack.html">git-receive-pack(1)</a>.</p></
 </p>\r
 </dd>\r
 <dt>\r
-&lt;refspec&gt;\r
+&lt;refspec&gt;&#8230;\r
 </dt>\r
 <dd>\r
 <p>\r
-        The canonical format of a &lt;refspec&gt; parameter is\r
+        The canonical format of each &lt;refspec&gt; parameter is\r
         <tt><tt>?&lt;src&gt;:&lt;dst&gt;</tt>; that is, an optional plus <tt></tt></tt>, followed\r
         by the source ref, followed by a colon <tt>:</tt>, followed by\r
         the destination ref.\r
@@ -778,14 +779,14 @@ git push origin :experimental
 </p>\r
 </dd>\r
 <dt>\r
-git push origin master:satellite/master\r
+git push origin master:satellite/master dev:satellite/dev\r
 </dt>\r
 <dd>\r
 <p>\r
-        Find a ref that matches <tt>master</tt> in the source repository\r
-        (most likely, it would find <tt>refs/heads/master</tt>), and update\r
-        the ref that matches <tt>satellite/master</tt> (most likely, it would\r
-        be <tt>refs/remotes/satellite/master</tt>) in <tt>origin</tt> repository with it.\r
+        Use the source ref that matches <tt>master</tt> (e.g. <tt>refs/heads/master</tt>)\r
+        to update the ref that matches <tt>satellite/master</tt> (most probably\r
+        <tt>refs/remotes/satellite/master</tt>) in the <tt>origin</tt> repository, then\r
+        do the same for <tt>dev</tt> and <tt>satellite/dev</tt>.\r
 </p>\r
 </dd>\r
 <dt>\r
@@ -817,7 +818,7 @@ by Linus Torvalds &lt;torvalds@osdl.org&gt;</p></div>
 </div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 2008-07-22 09:19:13 UTC\r
+Last updated 2008-07-30 18:31:05 UTC\r
 </div>\r
 </div>\r
 </body>\r
index 94d07ab8120d17d0667eeb8e420d4b2270ad7352..050c3ddae2732fdf4cb9f3b0f798e3d2d190fa4e 100644 (file)
@@ -10,7 +10,8 @@ SYNOPSIS
 --------
 [verse]
 'git push' [--all] [--dry-run] [--tags] [--receive-pack=<git-receive-pack>]
-           [--repo=all] [-f | --force] [-v | --verbose] [<repository> <refspec>...]
+          [--repo=all] [-f | --force] [-v | --verbose]
+          [<repository> <refspec>...]
 
 DESCRIPTION
 -----------
@@ -29,8 +30,8 @@ OPTIONS
        The "remote" repository that is destination of a push
        operation.  See the section <<URLS,GIT URLS>> below.
 
-<refspec>::
-       The canonical format of a <refspec> parameter is
+<refspec>...::
+       The canonical format of each <refspec> parameter is
        `+?<src>:<dst>`; that is, an optional plus `+`, followed
        by the source ref, followed by a colon `:`, followed by
        the destination ref.
@@ -180,11 +181,11 @@ git push origin :experimental::
        Find a ref that matches `experimental` in the `origin` repository
        (e.g. `refs/heads/experimental`), and delete it.
 
-git push origin master:satellite/master::
-       Find a ref that matches `master` in the source repository
-       (most likely, it would find `refs/heads/master`), and update
-       the ref that matches `satellite/master` (most likely, it would
-       be `refs/remotes/satellite/master`) in `origin` repository with it.
+git push origin master:satellite/master dev:satellite/dev::
+       Use the source ref that matches `master` (e.g. `refs/heads/master`)
+       to update the ref that matches `satellite/master` (most probably
+       `refs/remotes/satellite/master`) in the `origin` repository, then
+       do the same for `dev` and `satellite/dev`.
 
 git push origin master:refs/heads/experimental::
        Create the branch `experimental` in the `origin` repository
index f939669325ccfaee662f09632c3218762dad399d..5c8623ec592f1d46fd19822640882532a4072ca6 100644 (file)
@@ -614,8 +614,9 @@ The full SHA1 object name (40-byte hexadecimal string), or
 </li>\r
 <li>\r
 <p>\r
-An output from <em>git-describe</em>; i.e. a closest tag, followed by a\r
-  dash, a <tt>g</tt>, and an abbreviated object name.\r
+An output from <em>git-describe</em>; i.e. a closest tag, optionally\r
+  followed by a dash and a number of commits, followed by a dash, a\r
+  <tt>g</tt>, and an abbreviated object name.\r
 </p>\r
 </li>\r
 <li>\r
@@ -973,7 +974,7 @@ Junio C Hamano &lt;gitster@pobox.com&gt; and Pierre Habouzit &lt;madcoder@debian
 </div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 2008-07-22 09:19:16 UTC\r
+Last updated 2008-07-30 18:31:06 UTC\r
 </div>\r
 </div>\r
 </body>\r
index 5c936693d30d0537c00433721e6893d7c48be2ee..2921da320d2b84df4d15ec2745e6d94093dd6907 100644 (file)
@@ -155,8 +155,9 @@ blobs contained in a commit.
   name the same commit object if there are no other object in
   your repository whose object name starts with dae86e.
 
-* An output from 'git-describe'; i.e. a closest tag, followed by a
-  dash, a `g`, and an abbreviated object name.
+* An output from 'git-describe'; i.e. a closest tag, optionally
+  followed by a dash and a number of commits, followed by a dash, a
+  `g`, and an abbreviated object name.
 
 * A symbolic ref name.  E.g. 'master' typically means the commit
   object referenced by $GIT_DIR/refs/heads/master.  If you
index a740b8a4e0b4cfb97657841eef13b0485e1fbb87..cbac2b3d61808f5daa7ae853dfcc4af924b159d0 100644 (file)
@@ -325,16 +325,16 @@ git-svn(1) Manual Page
 <h2 id="_description">DESCRIPTION</h2>\r
 <div class="sectionbody">\r
 <div class="para"><p><em>git-svn</em> is a simple conduit for changesets between Subversion and git.\r
-It is not to be confused with <a href="git-svnimport.html">git-svnimport(1)</a>, which is\r
-read-only.</p></div>\r
-<div class="para"><p><em>git-svn</em> was originally designed for an individual developer who wants a\r
-bidirectional flow of changesets between a single branch in Subversion\r
-and an arbitrary number of branches in git.  Since its inception,\r
-<em>git-svn</em> has gained the ability to track multiple branches in a manner\r
-similar to <em>git-svnimport</em>.</p></div>\r
-<div class="para"><p><em>git-svn</em> is especially useful when it comes to tracking repositories\r
-not organized in the way Subversion developers recommend (trunk,\r
-branches, tags directories).</p></div>\r
+It provides a bidirectional flow of changes between a Subversion and a git\r
+respository.</p></div>\r
+<div class="para"><p><em>git-svn</em> can track a single Subversion branch simply by using a\r
+URL to the branch, follow branches laid out in the Subversion recommended\r
+method (trunk, branches, tags directories) with the --stdlayout option, or\r
+follow branches in any layout with the -T/-t/-b options (see options to\r
+<em>init</em> below, and also the <em>clone</em> command).</p></div>\r
+<div class="para"><p>Once tracking a Subversion branch (with any of the above methods), the git\r
+repository can be updated from Subversion by the <em>fetch</em> command and\r
+Subversion updated from git by the <em>dcommit</em> command.</p></div>\r
 </div>\r
 <h2 id="_commands">COMMANDS</h2>\r
 <div class="sectionbody">\r
@@ -715,8 +715,7 @@ environment). This command has the same behaviour.</td>
 <dd>\r
 <p>\r
         Commits the diff of two tree-ish arguments from the\r
-        command-line.  This command is intended for interoperability with\r
-        <em>git-svnimport</em> and does not rely on being inside an <tt>git-svn\r
+        command-line.  This command does not rely on being inside an <tt>git-svn\r
         init</tt>-ed repository.  This command takes three arguments, (a) the\r
         original tree to diff against, (b) the new tree result, (c) the\r
         URL of the target Subversion repository.  The final argument\r
@@ -865,8 +864,7 @@ config key: svn.findcopiesharder</div></div>
 </dt>\r
 <dd>\r
 <p>\r
-Syntax is compatible with the files used by <em>git-svnimport</em> and\r
-<em>git-cvsimport</em>:\r
+Syntax is compatible with the file used by <em>git-cvsimport</em>:\r
 </p>\r
 <div class="listingblock">\r
 <div class="content">\r
@@ -1221,7 +1219,7 @@ should be manually entered with a text-editor or using <em>git-config</em>.</p><
 </div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 2008-07-06 05:17:04 UTC\r
+Last updated 2008-07-30 18:31:06 UTC\r
 </div>\r
 </div>\r
 </body>\r
index e7c0f1c959d39739e177096875dd8aac5fd185d9..f230125a81baab9f13bf84e3543b63fc77a8e827 100644 (file)
@@ -12,18 +12,18 @@ SYNOPSIS
 DESCRIPTION
 -----------
 'git-svn' is a simple conduit for changesets between Subversion and git.
-It is not to be confused with linkgit:git-svnimport[1], which is
-read-only.
+It provides a bidirectional flow of changes between a Subversion and a git
+respository.
 
-'git-svn' was originally designed for an individual developer who wants a
-bidirectional flow of changesets between a single branch in Subversion
-and an arbitrary number of branches in git.  Since its inception,
-'git-svn' has gained the ability to track multiple branches in a manner
-similar to 'git-svnimport'.
+'git-svn' can track a single Subversion branch simply by using a
+URL to the branch, follow branches laid out in the Subversion recommended
+method (trunk, branches, tags directories) with the --stdlayout option, or
+follow branches in any layout with the -T/-t/-b options (see options to
+'init' below, and also the 'clone' command).
 
-'git-svn' is especially useful when it comes to tracking repositories
-not organized in the way Subversion developers recommend (trunk,
-branches, tags directories).
+Once tracking a Subversion branch (with any of the above methods), the git
+repository can be updated from Subversion by the 'fetch' command and
+Subversion updated from git by the 'dcommit' command.
 
 COMMANDS
 --------
@@ -218,8 +218,7 @@ Any other arguments are passed directly to 'git-log'
 
 'commit-diff'::
        Commits the diff of two tree-ish arguments from the
-       command-line.  This command is intended for interoperability with
-       'git-svnimport' and does not rely on being inside an `git-svn
+       command-line.  This command does not rely on being inside an `git-svn
        init`-ed repository.  This command takes three arguments, (a) the
        original tree to diff against, (b) the new tree result, (c) the
        URL of the target Subversion repository.  The final argument
@@ -317,8 +316,7 @@ config key: svn.findcopiesharder
 -A<filename>::
 --authors-file=<filename>::
 
-Syntax is compatible with the files used by 'git-svnimport' and
-'git-cvsimport':
+Syntax is compatible with the file used by 'git-cvsimport':
 
 ------------------------------------------------------------------------
        loginname = Joe User <user@example.com>
index a2339f7892bda8aac749f973eb261ce07aa1d263..35cef35579679045afb1adbf89cd2e8f09dbb305 100644 (file)
@@ -1,4 +1,4 @@
-<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.73.2"></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="id409313"></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="#id487384">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="#_pitfalls_with_submodules">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 -&gt; index</a></span></dt><dt><span class="section"><a href="#index-to-object-database">index -&gt; object database</a></span></dt><dt><span class="section"><a href="#object-database-to-index">object database -&gt; index</a></span></dt><dt><span class="section"><a href="#index-to-working-directory">index -&gt; 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="id487384"></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.73.2"></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="id493129"></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="#id570945">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="#_pitfalls_with_submodules">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 -&gt; index</a></span></dt><dt><span class="section"><a href="#index-to-object-database">index -&gt; object database</a></span></dt><dt><span class="section"><a href="#object-database-to-index">object database -&gt; index</a></span></dt><dt><span class="section"><a href="#index-to-working-directory">index -&gt; 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="id570945"></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 class="xref" href="#repositories-and-branches" title="Chapter 1. Repositories and Branches">Chapter 1, <i>Repositories and Branches</i></a> and <a class="xref" 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
@@ -1485,11 +1485,11 @@ $ cd super<br>
 $ git init<br>
 $ for i in a b c d<br>
 do<br>
-        git submodule add ~/git/$i<br>
+        git submodule add ~/git/$i $i<br>
 done</p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Do not use local URLs here if you plan to publish your superproject!</p></div><p>See what files <code class="literal">git-submodule</code> created:</p><div class="literallayout"><p>$ ls -a<br>
-.  ..  .git  .gitmodules  a  b  c  d</p></div><p>The <code class="literal">git-submodule add</code> command does a couple of things:</p><div class="itemizedlist"><ul type="disc"><li>
-It clones the submodule under the current directory and by default checks out
-  the master branch.
+.  ..  .git  .gitmodules  a  b  c  d</p></div><p>The <code class="literal">git-submodule add &lt;repo&gt; &lt;path&gt;</code> command does a couple of things:</p><div class="itemizedlist"><ul type="disc"><li>
+It clones the submodule from &lt;repo&gt; to the given &lt;path&gt; under the
+  current directory and by default checks out the master branch.
 </li><li>
 It adds the submodule's clone path to the <a class="ulink" href="gitmodules.html" target="_top">gitmodules(5)</a> file and
   adds this file to the index, ready to be committed.
index c5641af19059f5531e43bd4d4ff495548030fe98..00256ca57cc7453ef4a0dce90169078ee96e95e3 100644 (file)
@@ -3458,7 +3458,7 @@ $ cd super
 $ git init
 $ for i in a b c d
 do
-       git submodule add ~/git/$i
+       git submodule add ~/git/$i $i
 done
 -------------------------------------------------
 
@@ -3471,10 +3471,10 @@ $ ls -a
 .  ..  .git  .gitmodules  a  b  c  d
 -------------------------------------------------
 
-The `git-submodule add` command does a couple of things:
+The `git-submodule add <repo> <path>` command does a couple of things:
 
-- It clones the submodule under the current directory and by default checks out
-  the master branch.
+- It clones the submodule from <repo> to the given <path> under the
+  current directory and by default checks out the master branch.
 - It adds the submodule's clone path to the linkgit:gitmodules[5] file and
   adds this file to the index, ready to be committed.
 - It adds the submodule's current commit ID to the index, ready to be