git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>
To: Robert Buck <buck.robert.j@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: newbie: should git bare repositories (forked ones) have an origin  defined?
Date: Thu, 6 May 2010 01:49:29 +0100	[thread overview]
Message-ID: <u2n86ecb3c71005051749m95977244oa5c5ee809599dc4c@mail.gmail.com> (raw)
In-Reply-To: <q2r408104421005050940k2d054b20zad05552623ba2338@mail.gmail.com>

On 5 May 2010 17:40, Robert Buck <buck.robert.j@gmail.com> wrote:
>
> Question:
>
> Is what I am inquiring about reasonable, or is there a good reason to
> not have remote refs embedded into the public forked repository?
> How should public forked repositories ("next" in the use case above)
> be initially created on its host?
>
> Thank you,
>
> Bob


"origin" & "master" are just the default names for a remote & where
HEAD points to on remote repository.


A bare repository usually doesn't have any refs/remotes/* instead it
just has refs/heads/*

When you clone a bare repository refs/heads/* from bare repository are
pulled into refs/remotes/<remotename>/*

look at your .git/config to see how flexible this is.

you can do

[remote "qa-branches"]
      url = ../qa
      fetch = +refs/heads/qa-stable:refs/heads/stable
      fetch = +refs/heads/qa-appprove:refs/heads/next
      fetch = +refs/heads/qa-pending:refs/heads/dev

[remote "bob"]
      url = ../bob
      fetch = +refs/heads/qa-rejected:refs/heads/experimental

This repository can be public and you can have many remotes defined
all fetching into refs/heads.

Now set-up bare repositories that you like and set-up as many remotes
as locations you need to fetch from, figure out which heads to you
need to fetch & how you want to call them and you are done =)

      reply	other threads:[~2010-05-06  0:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05 16:40 newbie: should git bare repositories (forked ones) have an origin defined? Robert Buck
2010-05-06  0:49 ` Dmitrijs Ledkovs [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=u2n86ecb3c71005051749m95977244oa5c5ee809599dc4c@mail.gmail.com \
    --to=dmitrij.ledkov@ubuntu.com \
    --cc=buck.robert.j@gmail.com \
    --cc=git@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).