</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 13-Jan-2007 22:18:18 UTC\r
+Last updated 17-Jan-2007 05:40:13 UTC\r
</div>\r
</div>\r
</body>\r
$ git commit
------------
-////////////
-We should fix 'git rm' to remove goodbye.c from both index and
-working tree for the above example.
-////////////
-
Instead of staging files after each individual change, you can
tell `git commit` to notice the changes to the files whose
contents are tracked in
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>You can perform the first operation alone using the "git fetch"\r
-command. For example, Alice could create a temporary branch just to\r
-track Bob's changes, without merging them with her own, using:</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 fetch /home/bob/myrepo master:bob-incoming</tt></pre>\r
+<pre><tt>$ git remote add bob /home/bob/myrepo</tt></pre>\r
</div></div>\r
-<p>which fetches the changes from Bob's master branch into a new branch\r
-named bob-incoming. Then</p>\r
+<p>With this, you 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 log -p master..bob-incoming</tt></pre>\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, and possibly fixing things, Alice\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 checkout master\r
-$ git merge bob-incoming</tt></pre>\r
+<pre><tt>$ git merge bob/master</tt></pre>\r
</div></div>\r
-<p>The last command is a merge from the "bob-incoming" branch in Alice's\r
-own repository.</p>\r
-<p>Alice could also perform both steps at once with:</p>\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 /home/bob/myrepo master:bob-incoming</tt></pre>\r
+<pre><tt>$ git pull . remotes/bob/master</tt></pre>\r
</div></div>\r
-<p>This is just like the "git pull /home/bob/myrepo master" that we saw\r
-before, except that it also stores the unmerged changes from bob's\r
-master branch in bob-incoming before merging them into Alice's\r
-current branch. Note that git pull always merges into the current\r
-branch, regardless of what else is given on the commandline.</p>\r
+<p>Note that git pull always merges into the current branch,\r
+regardless of what else is given on the commandline.</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
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 15-Jan-2007 06:12:34 UTC\r
+Last updated 17-Jan-2007 05:40:14 UTC\r
</div>\r
</div>\r
</body>\r
The "pull" command thus performs two operations: it fetches changes
from a remote branch, then merges them into the current branch.
-You can perform the first operation alone using the "git fetch"
-command. For example, Alice could create a temporary branch just to
-track Bob's changes, without merging them with her own, using:
+When you are working in a small closely knit group, it is not
+unusual to interact with the same repository over and over
+again. By defining 'remote' repository shorthand, you can make
+it easier:
+
+------------------------------------------------
+$ git remote add bob /home/bob/myrepo
+------------------------------------------------
+
+With this, you can perform the first operation alone using the
+"git fetch" command without merging them with her own branch,
+using:
-------------------------------------
-$ git fetch /home/bob/myrepo master:bob-incoming
+$ git fetch bob
-------------------------------------
-which fetches the changes from Bob's master branch into a new branch
-named bob-incoming. Then
+Unlike the longhand form, when Alice fetches from Bob using a
+remote repository shorthand set up with `git remote`, what was
+fetched is stored in a remote tracking branch, in this case
+`bob/master`. So after this:
-------------------------------------
-$ git log -p master..bob-incoming
+$ git log -p master..bob/master
-------------------------------------
shows a list of all the changes that Bob made since he branched from
Alice's master branch.
-After examining those changes, and possibly fixing things, Alice
+After examining those changes, Alice
could merge the changes into her master branch:
-------------------------------------
-$ git checkout master
-$ git merge bob-incoming
+$ git merge bob/master
-------------------------------------
-The last command is a merge from the "bob-incoming" branch in Alice's
-own repository.
-
-Alice could also perform both steps at once with:
+This `merge` can also be done by 'pulling from her own remote
+tracking branch', like this:
-------------------------------------
-$ git pull /home/bob/myrepo master:bob-incoming
+$ git pull . remotes/bob/master
-------------------------------------
-This is just like the "git pull /home/bob/myrepo master" that we saw
-before, except that it also stores the unmerged changes from bob's
-master branch in bob-incoming before merging them into Alice's
-current branch. Note that git pull always merges into the current
-branch, regardless of what else is given on the commandline.
+Note that git pull always merges into the current branch,
+regardless of what else is given on the commandline.
Later, Bob can update his repo with Alice's latest changes using