summaryrefslogtreecommitdiffstats
path: root/gittutorial.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.html
parentbb8e996adf4293a0b624fe77e95e12ae8d1faed9 (diff)
downloadgit-htmldocs-fce7c7e1549d1a2a2b0faf5952378236eed4d468.tar.gz
Autogenerated HTML docs for v1.5.6.1-156-ge903b
Diffstat (limited to 'gittutorial.html')
-rw-r--r--gittutorial.html68
1 files changed, 34 insertions, 34 deletions
diff --git a/gittutorial.html b/gittutorial.html
index 7bc31e321..eddcf15b9 100644
--- a/gittutorial.html
+++ b/gittutorial.html
@@ -281,11 +281,11 @@ changes to it, and share changes with other developers.</p>
<p>If you are instead primarily interested in using git to fetch a project,
for example, to test the latest version, you may prefer to start with
the first two chapters of <a href="user-manual.html">The Git User's Manual</a>.</p>
-<p>First, note that you can get documentation for a command such as "git
-diff" with:</p>
+<p>First, note that you can get documentation for a command such as
+<tt>git log --graph</tt> with:</p>
<div class="listingblock">
<div class="content">
-<pre><tt>$ man git-diff</tt></pre>
+<pre><tt>$ man git-log</tt></pre>
</div></div>
<p>It is a good idea to introduce yourself to git with your name and
public email address before doing any operation. The easiest
@@ -314,14 +314,14 @@ $ git init</tt></pre>
<p>You've now initialized the working directory--you may notice a new
directory created, named ".git".</p>
<p>Next, tell git to take a snapshot of the contents of all files under the
-current directory (note the <em>.</em>), with <a href="git-add.html">git-add(1)</a>:</p>
+current directory (note the <em>.</em>), with <tt>git-add</tt>:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ git add .</tt></pre>
</div></div>
<p>This snapshot is now stored in a temporary staging area which git calls
the "index". You can permanently store the contents of the index in the
-repository with <a href="git-commit.html">git-commit(1)</a>:</p>
+repository with <tt>git-commit</tt>:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ git commit</tt></pre>
@@ -337,14 +337,14 @@ version of your project in git.</p>
<pre><tt>$ git add file1 file2 file3</tt></pre>
</div></div>
<p>You are now ready to commit. You can see what is about to be committed
-using <a href="git-diff.html">git-diff(1)</a> with the --cached option:</p>
+using <tt>git-diff</tt> with the --cached option:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ git diff --cached</tt></pre>
</div></div>
-<p>(Without --cached, <a href="git-diff.html">git-diff(1)</a> will show you any changes that
+<p>(Without --cached, <tt>git-diff</tt> will show you any changes that
you've made but not yet added to the index.) You can also get a brief
-summary of the situation with <a href="git-status.html">git-status(1)</a>:</p>
+summary of the situation with <tt>git-status</tt>:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ git status
@@ -365,7 +365,7 @@ newly modified content to the index. Finally, commit your changes with:</p>
</div></div>
<p>This will again prompt you for a message describing the change, and then
record a new version of the project.</p>
-<p>Alternatively, instead of running <tt>git add</tt> beforehand, you can use</p>
+<p>Alternatively, instead of running <tt>git-add</tt> beforehand, you can use</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ git commit -a</tt></pre>
@@ -381,9 +381,9 @@ commit in the body.</p>
</div>
<h2>Git tracks content not files</h2>
<div class="sectionbody">
-<p>Many revision control systems provide an "add" command that tells the
-system to start tracking changes to a new file. Git's "add" command
-does something simpler and more powerful: <tt>git add</tt> is used both for new
+<p>Many revision control systems provide an <tt>add</tt> command that tells the
+system to start tracking changes to a new file. Git's <tt>add</tt> command
+does something simpler and more powerful: <tt>git-add</tt> is used both for new
and newly modified files, and in both cases it takes a snapshot of the
given files and stages that content in the index, ready for inclusion in
the next commit.</p>
@@ -533,14 +533,14 @@ it easier:</p>
<pre><tt>$ git remote add bob /home/bob/myrepo</tt></pre>
</div></div>
<p>With this, Alice can perform the first operation alone using the
-"git fetch" command without merging them with her own branch,
+<tt>git-fetch</tt> command without merging them with her own branch,
using:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ git fetch bob</tt></pre>
</div></div>
<p>Unlike the longhand form, when Alice fetches from Bob using a
-remote repository shorthand set up with <tt>git remote</tt>, what was
+remote repository shorthand set up with <tt>git-remote</tt>, what was
fetched is stored in a remote tracking branch, in this case
<tt>bob/master</tt>. So after this:</p>
<div class="listingblock">
@@ -577,8 +577,8 @@ used for pulls:</p>
<pre><tt>$ git config --get remote.origin.url
/home/alice/project</tt></pre>
</div></div>
-<p>(The complete configuration created by git-clone is visible using
-"git config -l", and the <a href="git-config.html">git-config(1)</a> man page
+<p>(The complete configuration created by <tt>git-clone</tt> is visible using
+<tt>git config -l</tt>, and the <a href="git-config.html">git-config(1)</a> man page
explains the meaning of each option.)</p>
<p>Git also keeps a pristine copy of Alice's master branch under the
name "origin/master":</p>
@@ -597,12 +597,12 @@ perform clones and pulls using the ssh protocol:</p>
see <a href="git-pull.html">git-pull(1)</a> for details.</p>
<p>Git can also be used in a CVS-like mode, with a central repository
that various users push changes to; see <a href="git-push.html">git-push(1)</a> and
-<a href="gitcvs-migration.html">gitcvs-migration(7)</a>[git for CVS users].</p>
+<a href="gitcvs-migration.html">gitcvs-migration(7)</a>.</p>
</div>
<h2>Exploring history</h2>
<div class="sectionbody">
<p>Git history is represented as a series of interrelated commits. We
-have already seen that the git log command can list those commits.
+have already seen that the <tt>git-log</tt> command can list those commits.
Note that first line of each git log entry also gives a name for the
commit:</p>
<div class="listingblock">
@@ -614,7 +614,7 @@ Date: Tue May 16 17:18:22 2006 -0700
merge-base: Clarify the comments on post processing.</tt></pre>
</div></div>
-<p>We can give this name to git show to see the details about this
+<p>We can give this name to <tt>git-show</tt> to see the details about this
commit.</p>
<div class="listingblock">
<div class="content">
@@ -646,7 +646,7 @@ $ git show HEAD^2 # show the second parent of HEAD</tt></pre>
<p>You can also give commits names of your own; after running</p>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git-tag v2.5 1b2e1d63ff</tt></pre>
+<pre><tt>$ git tag v2.5 1b2e1d63ff</tt></pre>
</div></div>
<p>you can refer to 1b2e1d63ff by the name "v2.5". If you intend to
share this name with other people (for example, to identify a release
@@ -665,19 +665,19 @@ $ git reset --hard HEAD^ # reset your current branch and working
<p>Be careful with that last command: in addition to losing any changes
in the working directory, it will also remove all later commits from
this branch. If this branch is the only branch containing those
-commits, they will be lost. Also, don't use "git reset" on a
+commits, they will be lost. Also, don't use <tt>git-reset</tt> on a
publicly-visible branch that other developers pull from, as it will
force needless merges on other developers to clean up the history.
-If you need to undo changes that you have pushed, use <a href="git-revert.html">git-revert(1)</a>
+If you need to undo changes that you have pushed, use <tt>git-revert</tt>
instead.</p>
-<p>The git grep command can search for strings in any version of your
+<p>The <tt>git-grep</tt> command can search for strings in any version of your
project, so</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ git grep "hello" v2.5</tt></pre>
</div></div>
<p>searches for all occurrences of "hello" in v2.5.</p>
-<p>If you leave out the commit name, git grep will search any of the
+<p>If you leave out the commit name, <tt>git-grep</tt> will search any of the
files it manages in your current directory. So</p>
<div class="listingblock">
<div class="content">
@@ -685,7 +685,7 @@ files it manages in your current directory. So</p>
</div></div>
<p>is a quick way to search just the files that are tracked by git.</p>
<p>Many git commands also take sets of commits, which can be specified
-in a number of ways. Here are some examples with git log:</p>
+in a number of ways. Here are some examples with <tt>git-log</tt>:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ git log v2.5..v2.6 # commits between v2.5 and v2.6
@@ -694,7 +694,7 @@ $ git log --since="2 weeks ago" # commits from the last 2 weeks
$ git log v2.5.. Makefile # commits since v2.5 which modify
# Makefile</tt></pre>
</div></div>
-<p>You can also give git log a "range" of commits where the first is not
+<p>You can also give <tt>git-log</tt> a "range" of commits where the first is not
necessarily an ancestor of the second; for example, if the tips of
the branches "stable-release" and "master" diverged from a common
commit some time ago, then</p>
@@ -710,12 +710,12 @@ stable branch, while</p>
</div></div>
<p>will show the list of commits made on the stable branch but not
the experimental branch.</p>
-<p>The "git log" command has a weakness: it must present commits in a
+<p>The <tt>git-log</tt> command has a weakness: it must present commits in a
list. When the history has lines of development that diverged and
-then merged back together, the order in which "git log" presents
+then merged back together, the order in which <tt>git-log</tt> presents
those commits is meaningless.</p>
<p>Most projects with multiple contributors (such as the linux kernel,
-or git itself) have frequent merges, and gitk does a better job of
+or git itself) have frequent merges, and <tt>gitk</tt> does a better job of
visualizing their history. For example,</p>
<div class="listingblock">
<div class="content">
@@ -732,7 +732,7 @@ of the file:</p>
<div class="content">
<pre><tt>$ git diff v2.5:Makefile HEAD:Makefile.in</tt></pre>
</div></div>
-<p>You can also use "git show" to see any such file:</p>
+<p>You can also use <tt>git-show</tt> to see any such file:</p>
<div class="listingblock">
<div class="content">
<pre><tt>$ git show v2.5:Makefile</tt></pre>
@@ -760,9 +760,9 @@ The index file is a cache of the state of a directory tree,
</p>
</li>
</ul>
-<p><a href="gittutorial-2.html">gittutorial-2(7)</a>[Part two of this tutorial] explains the object
+<p>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.</p>
+need to make the most of git. You can find it at <a href="gittutorial-2.html">gittutorial-2(7)</a>.</p>
<p>If you don't want to continue with that right away, a few other
digressions that may be interesting at this point are:</p>
<ul>
@@ -791,7 +791,7 @@ digressions that may be interesting at this point are:</p>
</li>
<li>
<p>
-<a href="gitcvs-migration.html">gitcvs-migration(7)</a>[git for CVS users].
+<a href="gitcvs-migration.html">gitcvs-migration(7)</a>: Git for CVS users.
</p>
</li>
</ul>
@@ -811,7 +811,7 @@ digressions that may be interesting at this point are:</p>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 13-Jun-2008 10:02:46 UTC
+Last updated 02-Jul-2008 03:02:11 UTC
</div>
</div>
</body>