summaryrefslogtreecommitdiffstats
path: root/gittutorial-2.html
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2008-07-02 03:06:38 +0000
committerJunio C Hamano <junio@hera.kernel.org>2008-07-02 03:06:38 +0000
commitfce7c7e1549d1a2a2b0faf5952378236eed4d468 (patch)
treeffce2ae419b52786a0e567f4fddaadd89016f62c /gittutorial-2.html
parentbb8e996adf4293a0b624fe77e95e12ae8d1faed9 (diff)
downloadgit-htmldocs-fce7c7e1549d1a2a2b0faf5952378236eed4d468.tar.gz
Autogenerated HTML docs for v1.5.6.1-156-ge903b
Diffstat (limited to 'gittutorial-2.html')
-rw-r--r--gittutorial-2.html42
1 files changed, 20 insertions, 22 deletions
diff --git a/gittutorial-2.html b/gittutorial-2.html
index 54c2c83e2..c24a9fdbf 100644
--- a/gittutorial-2.html
+++ b/gittutorial-2.html
@@ -276,8 +276,7 @@ gittutorial-2(7) Manual Page
</div>
<h2>DESCRIPTION</h2>
<div class="sectionbody">
-<p>You should work through <a href="gittutorial.html">gittutorial(7)</a>[A tutorial introduction to
-git] before reading this tutorial.</p>
+<p>You should work through <a href="gittutorial.html">gittutorial(7)</a> before reading this tutorial.</p>
<p>The goal of this tutorial is to introduce two fundamental pieces of
git's architecture--the object database and the index file--and to
provide the reader with everything necessary to understand the rest
@@ -313,7 +312,7 @@ that would change the object's name as well).</p>
following the example above generates a different SHA1 hash than
the one shown above because the commit object records the time when
it was created and the name of the person performing the commit.</p>
-<p>We can ask git about this particular object with the cat-file
+<p>We can ask git about this particular object with the <tt>cat-file</tt>
command. Don't copy the 40 hex digits from this example but use those
from your own version. Note that you can shorten it to only a few
characters to save yourself typing all 40 hex digits:</p>
@@ -475,8 +474,8 @@ designate such an argument.</p>
</div>
<h2>The index file</h2>
<div class="sectionbody">
-<p>The primary tool we've been using to create commits is "git commit
--a", which creates a commit including every change you've made to
+<p>The primary tool we've been using to create commits is <tt>git-commit
+-a</tt>, which creates a commit including every change you've made to
your working tree. But what if you want to commit changes only to
certain files? Or only certain changes to certain files?</p>
<p>If we look at the way commits are created under the cover, we'll see
@@ -513,7 +512,7 @@ index a042389..513feba 100644
hello world!
+hello world, again</tt></pre>
</div></div>
-<p>So "git diff" is comparing against something other than the head.
+<p>So <tt>git-diff</tt> is comparing against something other than the head.
The thing that it's comparing against is actually the index file,
which is stored in .git/index in a binary format, but whose contents
we can examine with ls-files:</p>
@@ -527,9 +526,9 @@ $ git cat-file blob 513feba2
hello world!
hello world, again</tt></pre>
</div></div>
-<p>So what our "git add" did was store a new blob and then put
+<p>So what our <tt>git-add</tt> did was store a new blob and then put
a reference to it in the index file. If we modify the file again,
-we'll see that the new modifications are reflected in the "git diff"
+we'll see that the new modifications are reflected in the <tt>git-diff</tt>
output:</p>
<div class="listingblock">
<div class="content">
@@ -543,7 +542,7 @@ index 513feba..ba3da7b 100644
hello world, again
+again?</tt></pre>
</div></div>
-<p>With the right arguments, git diff can also show us the difference
+<p>With the right arguments, <tt>git-diff</tt> can also show us the difference
between the working directory and the last commit, or between the
index and the last commit:</p>
<div class="listingblock">
@@ -566,8 +565,8 @@ index a042389..513feba 100644
hello world!
+hello world, again</tt></pre>
</div></div>
-<p>At any time, we can create a new commit using "git commit" (without
-the -a option), and verify that the state committed only includes the
+<p>At any time, we can create a new commit using <tt>git-commit</tt> (without
+the "-a" option), and verify that the state committed only includes the
changes stored in the index file, not the additional change that is
still only in our working tree:</p>
<div class="listingblock">
@@ -583,17 +582,17 @@ index 513feba..ba3da7b 100644
hello world, again
+again?</tt></pre>
</div></div>
-<p>So by default "git commit" uses the index to create the commit, not
-the working tree; the -a option to commit tells it to first update
+<p>So by default <tt>git-commit</tt> uses the index to create the commit, not
+the working tree; the "-a" option to commit tells it to first update
the index with all changes in the working tree.</p>
-<p>Finally, it's worth looking at the effect of "git add" on the index
+<p>Finally, it's worth looking at the effect of <tt>git-add</tt> on the index
file:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ echo "goodbye, world" &gt;closing.txt
$ git add closing.txt</tt></pre>
</div></div>
-<p>The effect of the "git add" was to add one entry to the index file:</p>
+<p>The effect of the <tt>git-add</tt> was to add one entry to the index file:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ git ls-files --stage
@@ -630,13 +629,13 @@ changes in the working directory that aren't reflected in the index,
it is marked "changed but not updated". At this point, running "git
commit" would create a commit that added closing.txt (with its new
contents), but that didn't modify file.txt.</p>
-<p>Also, note that a bare "git diff" shows the changes to file.txt, but
+<p>Also, note that a bare <tt>git diff</tt> shows the changes to file.txt, but
not the addition of closing.txt, because the version of closing.txt
in the index file is identical to the one in the working directory.</p>
<p>In addition to being the staging area for new commits, the index file
is also populated from the object database when checking out a
branch, and is used to hold the trees involved in a merge operation.
-See the <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>[core tutorial] and the relevant man
+See <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a> and the relevant man
pages for details.</p>
</div>
<h2>What next?</h2>
@@ -644,16 +643,15 @@ pages for details.</p>
<p>At this point you should know everything necessary to read the man
pages for any of the git commands; one good place to start would be
with the commands mentioned in <a href="everyday.html">Everyday git</a>. You
-should be able to find any unknown jargon in the
-<a href="gitglossary.html">gitglossary(7)</a>[Glossary].</p>
+should be able to find any unknown jargon in <a href="gitglossary.html">gitglossary(7)</a>.</p>
<p>The <a href="user-manual.html">Git User's Manual</a> provides a more
comprehensive introduction to git.</p>
-<p>The <a href="gitcvs-migration.html">gitcvs-migration(7)</a>[CVS migration] document explains how to
+<p><a href="gitcvs-migration.html">gitcvs-migration(7)</a> explains how to
import a CVS repository into git, and shows how to use git in a
CVS-like way.</p>
<p>For some interesting examples of git use, see the
<a href="howto-index.html">howtos</a>.</p>
-<p>For git developers, the <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a>[Core tutorial] goes
+<p>For git developers, <a href="gitcore-tutorial.html">gitcore-tutorial(7)</a> goes
into detail on the lower-level git mechanisms involved in, for
example, creating a new commit.</p>
</div>
@@ -672,7 +670,7 @@ example, creating a new commit.</p>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 27-Jun-2008 08:26:24 UTC
+Last updated 02-Jul-2008 03:02:11 UTC
</div>
</div>
</body>