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

Cloning remote HTTP repository: Can only see 'master' branch

From
MTMichael Tyson <michael@atastypixel.com>
Date
Jan 29, 2013, 05:54 UTC
Message-ID
<83605E83-1110-449B-969D-AB43158376EA@atastypixel.com>
Hello!
I've a readonly git repository that I'm hosting via HTTP (a bare git repository located within the appropriate directory on the server). I push to it via my own SSH account (local repository with a remote pointing to the ssh:// URL).
This has all worked fine so far - I push via ssh, and others can clone and pull via the HTTP URL.
I've recently added a branch - "beta" - which pushed just fine, but now cloning via the HTTP URL doesn't seem to show the new branch - just master:
$ git clone http://server.tld/path/to/repository.git repository
Cloning into 'repository'...
$ cd repository
$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
Cloning via the readwrite ssh URL works fine though:
$ git clone ssh://user@server.tld:www/path/to/repository.git repository
Cloning into 'repository'...
stdin: is not a tty
remote: Counting objects: 225, done.
remote: Compressing objects: 100% (196/196), done.
remote: Total 225 (delta 109), reused 77 (delta 25)
Receiving objects: 100% (225/225), 9.55 MiB | 295 KiB/s, done.
Resolving deltas: 100% (109/109), done.
$ cd repository
$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/beta
  remotes/origin/master
I've tried 'git clone --mirror' just in case, but this just resulted in a bare repository with only the 'master' branch, still.
Anyone have any ideas about what I'm doing wrong?

Cheers, Michael

Next: Jeff King
Message 1 of 3 in “Cloning remote HTTP repository: Can only see 'master' branch”
  1. Michael TysonJan 29, 2013
  2. Jeff KingJan 29, 2013
  3. Michael TysonJan 30, 2013

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.