git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: publishing a forked^W cloned directory with ancestry

From
Bart Trojanowski <bart@jukie.net>
Date
Aug 30, 2007, 20:27 UTC
Message-ID
<20070830202747.GT10772@jukie.net>
In-Reply-To
<20070830192533.GA18751@piper.oerlikon.madduck.net>
* martin f krafft <madduck@madduck.net> [070830 15:25]:
> [1] I tried cloning B from A, then cloning C from B. Within C, there
>     is no reference to A's master branch, so unless B pulled changes
>     from A and C pulled changes from B, C could not be updated.
I think a .git/config like this will do what you want:
[remote "upstream"]
        url = git://mdadm-upstream-repo
        fetch = +refs/heads/*:refs/remotes/upstream/*
[remote "debian"]
        url = git://debian-repo-you-want-to-publish-to
        fetch = +refs/heads/*:refs/remotes/debian/*
        push = refs/remotes/upstream/master:refs/heads/upstream
        push = refs/heads/master:refs/heads/master

Now when you 'git push debian' it will populate the 'upstream' and 'master' branches properly.

When someone clones your repo, they will get origin/master (your branch) and origin/upstream (the official mdadm branch).

Did I understand the problem correctly?
-Bart
-- 
				WebSig: http://www.jukie.net/~bart/sig/
Previous: J. Bruce FieldsNext: martin f krafft
Message 4 of 5 in “publishing a forked^W cloned directory with ancestry”
  1. martin f krafftAug 30, 2007
  2. martin f krafftAug 30, 2007
  3. J. Bruce FieldsAug 30, 2007
  4. Bart TrojanowskiAug 30, 2007
  5. martin f krafftSep 4, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.