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

adding additional remote refs to a remote repo

From
PPPeter Petrakis <peter.petrakis@gmail.com>
Date
Dec 17, 2009, 17:43 UTC
Message-ID
<a422b4da0912170943q2613faeao208eaa674d1a0afa@mail.gmail.com>

I'm setting up a remote repo to aggregate some development which spans multiple git trees. So I have a bare repo setup using gitosis that I can happily commit to. I've added the entries directly to the config on the server...

-sh-3.2$ ls
branches  config  description  git-daemon-export-ok  HEAD  hooks  info
 objects  refs
-sh-3.2$ cat config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = true
[remote "drbd-8.2"]
        url = git://git.drbd.org/drbd-8.2.git
        fetch = +refs/heads/*:refs/remotes/drbd-8.2/*

but when I clone the repo, the remote doesn't show up. What am I doing wrong? I can easily add the remotes in my local copy and work with the product. The problem is that we're tracking this upstream project and need to manage multiple versions of it to serve past releases. So in my case the branches will directly track the upstream development + any changes we need and then be merged into master.

For example in my local clone.
[remote "drbd-8.2"]
        url = git://git.drbd.org/drbd-8.2.git
        fetch = +refs/heads/*:refs/remotes/drbd-8.2/*
[branch "drbd-8.2.7-merge-branch"]
        remote = drbd-8.2
        merge = refs/heads/master

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.

Peter
Next: Junio C Hamano
Message 1 of 2 in “adding additional remote refs to a remote repo”
  1. Peter PetrakisDec 17, 2009
  2. Junio C HamanoDec 17, 2009

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.