From: Junio C Hamano <gitster@pobox.com>
To: Peter Petrakis <peter.petrakis@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: adding additional remote refs to a remote repo
Date: Thu, 17 Dec 2009 10:19:01 -0800 [thread overview]
Message-ID: <7v4onpo44q.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <a422b4da0912170943q2613faeao208eaa674d1a0afa@mail.gmail.com> (Peter Petrakis's message of "Thu\, 17 Dec 2009 12\:43\:19 -0500")
Peter Petrakis <peter.petrakis@gmail.com> writes:
> Now if I push this drbd-8.2.7-merge-branch to the central repo, the next
> guy won't know for sure what this was tracking. I also don't want to
> have to 'add remote ...' every time I clone a new copy. Thanks.
The kind of information you listed above are kept in $GIT_DIR/config of
each repository. This file is kept private to each repository, i.e. not
cloned, fetched or pushed across repositories [*1*].
This is a deliberate design decision.
- The file records mostly personal preferences, e.g. how user works with
his branches in the repository, if the integration is done via rebase
instead of merge, how the output is colored, etc. Your colleagues can
and will use branches other than the ones that may be publicly shared
(like drbd-8.2.7-merge-branch), and how they use their private branches
is not something you want to dictate nor interfere with.
- The [remote "foo"] sections and friends (e.g. [branch "bar"]) in the
"$GIT_DIR/config" in that bare repository you created specifies how
that particular repository interacts with the remote named "foo" and
how branch "bar" is integrated with other things. These may not
necessarily match, and if you are using it as a middleman repository
between your developers and the project upstream, they will in general
not match, the setting the developer repositories want to use. This
should be obvious if you think about where remote.origin.url should
point at. In the middleman repository, you would want "git fetch"
without "origin" to slurp from the upstream and in the developer clones
of this repository, you would want to "git fetch" to update from this
middleman repository.
- The file can has pointers to external programs to be used as filters;
blindly copying it upon clone has security implications as well.
[Footnote]
*1* Often people use README-like document in-tree to tell developers about
the specific settings the project wants them to use (i.e. "how to work
with this project"), together with coding styles, submission guidelines,
etc., that are not tied to the use of git.
prev parent reply other threads:[~2009-12-17 18:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 17:43 adding additional remote refs to a remote repo Peter Petrakis
2009-12-17 18:19 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v4onpo44q.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peter.petrakis@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox