<div class="title">Note</div>\r
</td>\r
<td class="content">\r
-<p>The first <tt>git clone</tt> places the following in the\r
-<tt>my-project/.git/remotes/origin</tt> file, and that's why the previous step\r
-and the next step both work.</p>\r
-<div class="listingblock">\r
-<div class="content">\r
-<pre><tt>URL: foo.com:/pub/project.git/\r
-Pull: refs/heads/master:refs/remotes/origin/master</tt></pre>\r
-</div></div>\r
+<p>The <tt>pull</tt> command knows where to get updates from because of certain\r
+configuration variables that were set by the first <tt>git clone</tt>\r
+command; see <tt>git repo-config -l</tt> and the <a href="git-repo-config.html">git-repo-config(1)</a> man\r
+page for details.</p>\r
</td>\r
</tr></table>\r
</div>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 09-Dec-2006 21:15:38 UTC\r
+Last updated 01-Jan-2007 03:20:16 UTC\r
</div>\r
</div>\r
</body>\r
[NOTE]
================================
-The first `git clone` places the following in the
-`my-project/.git/remotes/origin` file, and that's why the previous step
-and the next step both work.
-------------
-URL: foo.com:/pub/project.git/
-Pull: refs/heads/master:refs/remotes/origin/master
-------------
+The `pull` command knows where to get updates from because of certain
+configuration variables that were set by the first `git clone`
+command; see `git repo-config -l` and the gitlink:git-repo-config[1] man
+page for details.
================================
You can update the shared repository with your changes by first committing
Also the branch heads at the remote are copied directly\r
to corresponding local branch heads, without mapping\r
them to <tt>refs/remotes/origin/</tt>. When this option is\r
- used, neither the <tt>origin</tt> branch nor the default\r
- <tt>remotes/origin</tt> file is created.\r
+ used, neither remote-tracking branches nor the related\r
+ configuration variables are created.\r
</p>\r
</dd>\r
<dt>\r
</dt>\r
<dd>\r
<p>\r
- Instead of using the branch name <em>origin</em> to keep track\r
- of the upstream repository, use <name> instead. Note\r
- that the shorthand name stored in <tt>remotes/origin</tt> is\r
- not affected, but the local branch name to pull the\r
- remote <tt>master</tt> branch into is.\r
+ Instead of using the remote name <em>origin</em> to keep track\r
+ of the upstream repository, use <name> instead.\r
</p>\r
</dd>\r
<dt>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 21-Dec-2006 02:25:49 UTC\r
+Last updated 01-Jan-2007 03:20:13 UTC\r
</div>\r
</div>\r
</body>\r
Also the branch heads at the remote are copied directly
to corresponding local branch heads, without mapping
them to `refs/remotes/origin/`. When this option is
- used, neither the `origin` branch nor the default
- `remotes/origin` file is created.
+ used, neither remote-tracking branches nor the related
+ configuration variables are created.
--origin <name>::
-o <name>::
- Instead of using the branch name 'origin' to keep track
- of the upstream repository, use <name> instead. Note
- that the shorthand name stored in `remotes/origin` is
- not affected, but the local branch name to pull the
- remote `master` branch into is.
+ Instead of using the remote name 'origin' to keep track
+ of the upstream repository, use <name> instead.
--upload-pack <upload-pack>::
-u <upload-pack>::
named file should be in the following format:</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>URL: one of the above URL format\r
-Push: <refspec>\r
-Pull: <refspec></tt></pre>\r
+<pre><tt> URL: one of the above URL format\r
+ Push: <refspec>\r
+ Pull: <refspec>\r
+</tt></pre>\r
</div></div>\r
<p>Then such a short-hand is specified in place of\r
<repository> without <refspec> parameters on the command\r
of <tt>fetch</tt> instead of <tt>Pull:</tt>):</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>[remote "<remote>"]\r
- url = <url>\r
- push = <refspec>\r
- fetch = <refspec></tt></pre>\r
+<pre><tt> [remote "<remote>"]\r
+ url = <url>\r
+ push = <refspec>\r
+ fetch = <refspec>\r
+</tt></pre>\r
</div></div>\r
<p>The name of a file in <tt>$GIT_DIR/branches</tt> directory can be\r
specified as an older notation short-hand; the named\r
corresponding file in the <tt>$GIT_DIR/remotes/</tt> directory.</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>URL: <url>\r
-Pull: refs/heads/master:<remote></tt></pre>\r
+<pre><tt> URL: <url>\r
+ Pull: refs/heads/master:<remote>\r
+</tt></pre>\r
</div></div>\r
<p>while having <tt><url>#<head></tt> is equivalent to</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>URL: <url>\r
-Pull: refs/heads/<head>:<remote></tt></pre>\r
+<pre><tt> URL: <url>\r
+ Pull: refs/heads/<head>:<remote></tt></pre>\r
</div></div>\r
</div>\r
<h2>SEE ALSO</h2>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 31-Dec-2006 08:29:25 UTC\r
+Last updated 01-Jan-2007 03:20:13 UTC\r
</div>\r
</div>\r
</body>\r
named file should be in the following format:</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>URL: one of the above URL format\r
-Push: <refspec>\r
-Pull: <refspec></tt></pre>\r
+<pre><tt> URL: one of the above URL format\r
+ Push: <refspec>\r
+ Pull: <refspec>\r
+</tt></pre>\r
</div></div>\r
<p>Then such a short-hand is specified in place of\r
<repository> without <refspec> parameters on the command\r
of <tt>fetch</tt> instead of <tt>Pull:</tt>):</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>[remote "<remote>"]\r
- url = <url>\r
- push = <refspec>\r
- fetch = <refspec></tt></pre>\r
+<pre><tt> [remote "<remote>"]\r
+ url = <url>\r
+ push = <refspec>\r
+ fetch = <refspec>\r
+</tt></pre>\r
</div></div>\r
<p>The name of a file in <tt>$GIT_DIR/branches</tt> directory can be\r
specified as an older notation short-hand; the named\r
corresponding file in the <tt>$GIT_DIR/remotes/</tt> directory.</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>URL: <url>\r
-Pull: refs/heads/master:<remote></tt></pre>\r
+<pre><tt> URL: <url>\r
+ Pull: refs/heads/master:<remote>\r
+</tt></pre>\r
</div></div>\r
<p>while having <tt><url>#<head></tt> is equivalent to</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>URL: <url>\r
-Pull: refs/heads/<head>:<remote></tt></pre>\r
+<pre><tt> URL: <url>\r
+ Pull: refs/heads/<head>:<remote></tt></pre>\r
</div></div>\r
</div>\r
<h2>MERGE STRATEGIES</h2>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 31-Dec-2006 08:29:26 UTC\r
+Last updated 01-Jan-2007 03:20:14 UTC\r
</div>\r
</div>\r
</body>\r
named file should be in the following format:</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>URL: one of the above URL format\r
-Push: <refspec>\r
-Pull: <refspec></tt></pre>\r
+<pre><tt> URL: one of the above URL format\r
+ Push: <refspec>\r
+ Pull: <refspec>\r
+</tt></pre>\r
</div></div>\r
<p>Then such a short-hand is specified in place of\r
<repository> without <refspec> parameters on the command\r
of <tt>fetch</tt> instead of <tt>Pull:</tt>):</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>[remote "<remote>"]\r
- url = <url>\r
- push = <refspec>\r
- fetch = <refspec></tt></pre>\r
+<pre><tt> [remote "<remote>"]\r
+ url = <url>\r
+ push = <refspec>\r
+ fetch = <refspec>\r
+</tt></pre>\r
</div></div>\r
<p>The name of a file in <tt>$GIT_DIR/branches</tt> directory can be\r
specified as an older notation short-hand; the named\r
corresponding file in the <tt>$GIT_DIR/remotes/</tt> directory.</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>URL: <url>\r
-Pull: refs/heads/master:<remote></tt></pre>\r
+<pre><tt> URL: <url>\r
+ Pull: refs/heads/master:<remote>\r
+</tt></pre>\r
</div></div>\r
<p>while having <tt><url>#<head></tt> is equivalent to</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>URL: <url>\r
-Pull: refs/heads/<head>:<remote></tt></pre>\r
+<pre><tt> URL: <url>\r
+ Pull: refs/heads/<head>:<remote></tt></pre>\r
</div></div>\r
</div>\r
<h2>Author</h2>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 31-Dec-2006 08:29:27 UTC\r
+Last updated 01-Jan-2007 03:20:15 UTC\r
</div>\r
</div>\r
</body>\r
</dt>\r
<dd>\r
<p>\r
- The default upstream <a href="#ref_tracking_branch">tracking branch</a>. Most\r
- projects have at least one upstream project which they track. By default\r
+ The default upstream <a href="#ref_repository">repository</a>. Most projects have\r
+ at least one upstream project which they track. By default\r
<em><a href="#ref_origin">origin</a></em> is used for that purpose. New upstream updates\r
- will be fetched into this <a href="#ref_branch">branch</a>; you should never\r
- <a href="#ref_commit">commit</a> to it yourself.\r
+ will be fetched into remote tracking branches named\r
+ <a href="#ref_origin">origin</a>/name-of-upstream-<a href="#ref_branch">branch</a>, which you\r
+ can see using "git <a href="#ref_branch">branch</a> -r".\r
</p>\r
</dd>\r
<dt>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 18-Nov-2006 22:17:51 UTC\r
+Last updated 01-Jan-2007 03:20:17 UTC\r
</div>\r
</div>\r
</body>\r
predator.
origin::
- The default upstream tracking branch. Most projects have at
+ The default upstream repository. Most projects have at
least one upstream project which they track. By default
'origin' is used for that purpose. New upstream updates
- will be fetched into this branch; you should never commit
- to it yourself.
+ will be fetched into remote tracking branches named
+ origin/name-of-upstream-branch, which you can see using
+ "git branch -r".
pack::
A set of objects which have been compressed into one file (to save
<p>Another use suggested on the mailing list is to use this hook to\r
implement access control which is finer grained than the one\r
based on filesystem group.</p>\r
-<p>The standard output of this hook is sent to <tt>/dev/null</tt>; if you\r
+<p>The standard output of this hook is sent to <tt>stderr</tt>, so if you\r
want to report something to the <tt>git-send-pack</tt> on the other end,\r
-you can redirect your output to your <tt>stderr</tt>.</p>\r
+you can simply <tt>echo</tt> your messages.</p>\r
</div>\r
<h2>post-update</h2>\r
<div class="sectionbody">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 03-Oct-2006 08:41:47 UTC\r
+Last updated 01-Jan-2007 03:20:17 UTC\r
</div>\r
</div>\r
</body>\r
implement access control which is finer grained than the one
based on filesystem group.
-The standard output of this hook is sent to `/dev/null`; if you
+The standard output of this hook is sent to `stderr`, so if you
want to report something to the `git-send-pack` on the other end,
-you can redirect your output to your `stderr`.
+you can simply `echo` your messages.
post-update
</div></div>\r
<p>Note that he doesn't need to give the path to Alice's repository;\r
when Bob cloned Alice's repository, git stored the location of her\r
-repository in the file .git/remotes/origin, and that location is used\r
-as the default for pulls.</p>\r
-<p>Bob may also notice a branch in his repository that he didn't create:</p>\r
+repository in the repository configuration, and that location is\r
+used for pulls:</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>$ git branch\r
-* master\r
- origin</tt></pre>\r
+<pre><tt>$ git repo-config --get remote.origin.url\r
+/home/bob/myrepo</tt></pre>\r
+</div></div>\r
+<p>(The complete configuration created by git-clone is visible using\r
+"git repo-config -l", and the <a href="git-repo-config.html">git-repo-config(1)</a> man page\r
+explains the meaning of each option.)</p>\r
+<p>Git also keeps a pristine copy of Alice's master branch under the\r
+name "origin/master":</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git branch -r\r
+ origin/master</tt></pre>\r
</div></div>\r
-<p>The "origin" branch, which was created automatically by "git clone",\r
-is a pristine copy of Alice's master branch; Bob should never commit\r
-to it.</p>\r
<p>If Bob later decides to work from a different host, he can still\r
perform clones and pulls using the ssh protocol:</p>\r
<div class="listingblock">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 16-Dec-2006 07:43:53 UTC\r
+Last updated 01-Jan-2007 03:20:15 UTC\r
</div>\r
</div>\r
</body>\r
Note that he doesn't need to give the path to Alice's repository;
when Bob cloned Alice's repository, git stored the location of her
-repository in the file .git/remotes/origin, and that location is used
-as the default for pulls.
-
-Bob may also notice a branch in his repository that he didn't create:
+repository in the repository configuration, and that location is
+used for pulls:
-------------------------------------
-$ git branch
-* master
- origin
+$ git repo-config --get remote.origin.url
+/home/bob/myrepo
-------------------------------------
-The "origin" branch, which was created automatically by "git clone",
-is a pristine copy of Alice's master branch; Bob should never commit
-to it.
+(The complete configuration created by git-clone is visible using
+"git repo-config -l", and the gitlink:git-repo-config[1] man page
+explains the meaning of each option.)
+
+Git also keeps a pristine copy of Alice's master branch under the
+name "origin/master":
+
+-------------------------------------
+$ git branch -r
+ origin/master
+-------------------------------------
If Bob later decides to work from a different host, he can still
perform clones and pulls using the ssh protocol:
named file should be in the following format:
------------
-URL: one of the above URL format
-Push: <refspec>
-Pull: <refspec>
+ URL: one of the above URL format
+ Push: <refspec>
+ Pull: <refspec>
+
------------
Then such a short-hand is specified in place of
of `fetch` instead of `Pull:`):
------------
-[remote "<remote>"]
- url = <url>
- push = <refspec>
- fetch = <refspec>
+ [remote "<remote>"]
+ url = <url>
+ push = <refspec>
+ fetch = <refspec>
+
------------
The name of a file in `$GIT_DIR/branches` directory can be
corresponding file in the `$GIT_DIR/remotes/` directory.
------------
-URL: <url>
-Pull: refs/heads/master:<remote>
-------------
+ URL: <url>
+ Pull: refs/heads/master:<remote>
+------------
while having `<url>#<head>` is equivalent to
------------
-URL: <url>
-Pull: refs/heads/<head>:<remote>
+ URL: <url>
+ Pull: refs/heads/<head>:<remote>
------------