<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.1" />\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
<ul>\r
<li>\r
<p>\r
-a symlink called <tt>HEAD</tt>, pointing to <tt>refs/heads/master</tt> (if your\r
- platform does not have native symlinks, it is a file containing the\r
- line "ref: refs/heads/master")\r
+a file called <tt>HEAD</tt>, that has <tt>ref: refs/heads/master</tt> in it.\r
+ This is similar to a symbolic link and points at\r
+ <tt>refs/heads/master</tt> relative to the <tt>HEAD</tt> file.\r
</p>\r
<p>Don't worry about the fact that the file that the <tt>HEAD</tt> link points to\r
doesn't even exist yet — you haven't created the commit that will\r
<em>tags</em> that you have created to name specific versions in your\r
repository.</p>\r
<p>One note: the special <tt>master</tt> head is the default branch, which is\r
-why the <tt>.git/HEAD</tt> file was created as a symlink to it even if it\r
+why the <tt>.git/HEAD</tt> file was created points to it even if it\r
doesn't yet exist. Basically, the <tt>HEAD</tt> link is supposed to always\r
point to the branch you are working on right now, and you always\r
start out expecting to work on the <tt>master</tt> branch.</p>\r
<pre><tt>$ echo "Hello World" >hello\r
$ echo "Silly example" >example</tt></pre>\r
</div></div>\r
-<p>you have now created two files in your working tree (aka <em>working directory</em>), but to\r
-actually check in your hard work, you will have to go through two steps:</p>\r
+<p>you have now created two files in your working tree (aka <em>working directory</em>),\r
+but to actually check in your hard work, you will have to go through two steps:</p>\r
<ul>\r
<li>\r
<p>\r
<pre><tt>.git/objects/55/7db03de997c86a4a028e1ebd3a1ceb225be238\r
.git/objects/f2/4c74a2e500f5ee1332c86b94199f52b1d1d962</tt></pre>\r
</div></div>\r
-<p>which correspond with the objects with names of 557db… and f24c7..\r
-respectively.</p>\r
+<p>which correspond with the objects with names of <tt>557db…</tt> and\r
+<tt>f24c7…</tt> respectively.</p>\r
<p>If you want to, you can use <tt>git-cat-file</tt> to look at those objects, but\r
you'll have to use the object name, not the filename of the object:</p>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>$ git-cat-file "blob" 557db03</tt></pre>\r
</div></div>\r
-<p>which will print out "Hello World". The object 557db03 is nothing\r
+<p>which will print out "Hello World". The object <tt>557db03</tt> is nothing\r
more than the contents of your file <tt>hello</tt>.</p>\r
<div class="admonitionblock">\r
<table><tr>\r
</td>\r
</tr></table>\r
</div>\r
-<p>More interestingly, you can also give <tt>git-diff-tree</tt> the <tt>-v</tt> flag, which\r
-tells it to also show the commit message and author and date of the\r
+<p>More interestingly, you can also give <tt>git-diff-tree</tt> the <tt>—pretty</tt> flag,\r
+which tells it to also show the commit message and author and date of the\r
commit, and you can tell it to show a whole series of diffs.\r
Alternatively, you can tell it to be "silent", and not show the diffs at\r
all, but just show the actual commit message.</p>\r
branch you happen to be on, a simple</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>$ ls -l .git/HEAD</tt></pre>\r
-</div></div>\r
-<p>will tell you where it's pointing (Note that on platforms with bad or no\r
-symlink support, you have to execute</p>\r
-<div class="listingblock">\r
-<div class="content">\r
<pre><tt>$ cat .git/HEAD</tt></pre>\r
</div></div>\r
-<p>instead). To get the list of branches you have, you can say</p>\r
+<p>will tell you where it's pointing. To get the list of branches\r
+you have, you can say</p>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>$ git branch</tt></pre>\r
<div class="content">\r
<pre><tt>$ git checkout mybranch\r
$ echo "Work, work, work" >>hello\r
-$ git commit -m 'Some work.' hello</tt></pre>\r
+$ git commit -m 'Some work.' -i hello</tt></pre>\r
</div></div>\r
<p>Here, we just added another line to <tt>hello</tt>, and we used a shorthand for\r
doing both <tt>git-update-index hello</tt> and <tt>git commit</tt> by just giving the\r
-filename directly to <tt>git commit</tt>. The <tt>-m</tt> flag is to give the\r
+filename directly to <tt>git commit</tt>, with an <tt>-i</tt> flag (it tells\r
+git to <em>include</em> that file in addition to what you have done to\r
+the index file so far when making the commit). The <tt>-m</tt> flag is to give the\r
commit log message from the command line.</p>\r
<p>Now, to make it a bit more interesting, let's assume that somebody else\r
does some work in the original branch, and simulate that by going back\r
<div class="content">\r
<pre><tt>$ echo "Play, play, play" >>hello\r
$ echo "Lots of fun" >>example\r
-$ git commit -m 'Some fun.' hello example</tt></pre>\r
+$ git commit -m 'Some fun.' -i hello example</tt></pre>\r
</div></div>\r
<p>since the master branch is obviously in a much better mood.</p>\r
<p>Now, you've got two branches, and you decide that you want to merge the\r
...\r
Auto-merging hello\r
CONFLICT (content): Merge conflict in hello\r
- Automatic merge failed/prevented; fix up by hand</tt></pre>\r
+ Automatic merge failed; fix up by hand</tt></pre>\r
</div></div>\r
<p>which is way too verbose, but it basically tells you that it failed the\r
really trivial merge ("Simple merge") and did an "Automatic merge"\r
<p>and once you're happy with your manual merge, just do a</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>$ git commit hello</tt></pre>\r
+<pre><tt>$ git commit -i hello</tt></pre>\r
</div></div>\r
<p>which will very loudly warn you that you're now committing a merge\r
(which is correct, so never mind), and you can write a small merge\r
environment, is <tt>git show-branch</tt>.</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>$ git show-branch master mybranch\r
+<pre><tt>$ git show-branch --topo-order master mybranch\r
* [master] Merge work in mybranch\r
! [mybranch] Some work.\r
--\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>Updating from ae3a2da... to a80b4aa....\r
+Fast forward\r
example | 1 +\r
hello | 1 +\r
2 files changed, 2 insertions(+), 0 deletions(-)</tt></pre>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 30-Jan-2006 23:10:20 PDT\r
+Last updated 07-Feb-2006 08:04:34 UTC\r
</div>\r
</div>\r
</body>\r