On Apr 2, 2009, at 4:45 PM, John Dlugosz wrote:
If your repository is using .git/remotes/origin to name the "origin"
I don't have a directory under .git called remotes. A new repository
made using clone describes origin in the config file. Is that an old
way of doing things?
Yep. Earlier git versions used one config file per remote. Newer git
versions use the .git/config file.
remote, they are still honored. But you are correct to point out
that
branch.<name>.remote and with the remote.<name>.* variables in
.git/config
are used to control these more recent features. So in that sense the
documentation is still correct.
A related question: is the name "origin" hard-coded as the default,
or
does each repository remember specifically which is the upstream
repository regardless of what you named it? From what I see in the
config file, it would have to be per-branch. I suppose in other cases
it's implicit in where the label was found under remotes.
'origin' is the default name for the remote you cloned from. But there
is nothing special to it other than being a default name used
throughout git. You can manually add remotes under a different name if
you like.
$ git clone $url ./xyz
is roughly the same as:
$ mkdir ./xyz && cd ./xyz
$ git init
$ git remote add origin $url
$ git fetch origin
$ git checkout -b master origin/master
tom
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html