{"thread":{"id":"32762","subject":"Cloning remote HTTP repository: Can only see 'master' branch","startedAt":"2013-01-29T05:54:13Z","lastAt":"2013-01-30T00:06:31Z","messageCount":3,"participants":["Michael Tyson","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"208154","messageId":"83605E83-1110-449B-969D-AB43158376EA@atastypixel.com","threadId":"32762","inReplyTo":null,"subject":"Cloning remote HTTP repository: Can only see 'master' branch","fromName":"Michael Tyson","fromEmail":"michael@atastypixel.com","sentAt":"2013-01-29T05:54:13Z","receivedAt":"2013-01-29T05:54:13Z","isPatch":false,"sender":{"key":"michael@atastypixel.com","avatar":null},"body":"Hello!\n\nI'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).\n\nThis has all worked fine so far - I push via ssh, and others can clone and pull via the HTTP URL.\n\nI'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:\n\n$ git clone http://server.tld/path/to/repository.git repository\nCloning into 'repository'...\n$ cd repository\n$ git branch -a\n* master\n  remotes/origin/HEAD -> origin/master\n  remotes/origin/master\n\nCloning via the readwrite ssh URL works fine though:\n\n$ git clone ssh://user@server.tld:www/path/to/repository.git repository\nCloning into 'repository'...\nstdin: is not a tty\nremote: Counting objects: 225, done.\nremote: Compressing objects: 100% (196/196), done.\nremote: Total 225 (delta 109), reused 77 (delta 25)\nReceiving objects: 100% (225/225), 9.55 MiB | 295 KiB/s, done.\nResolving deltas: 100% (109/109), done.\n$ cd repository\n$ git branch -a\n* master\n  remotes/origin/HEAD -> origin/master\n  remotes/origin/beta\n  remotes/origin/master\n\nI've tried 'git clone --mirror' just in case, but this just resulted in a bare repository with only the 'master' branch, still.\n\nAnyone have any ideas about what I'm doing wrong?\n\nCheers,\nMichael\n"},{"id":"208162","messageId":"20130129082317.GA6396@sigill.intra.peff.net","threadId":"32762","inReplyTo":"83605E83-1110-449B-969D-AB43158376EA@atastypixel.com","subject":"Re: Cloning remote HTTP repository: Can only see 'master' branch","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-01-29T08:23:17Z","receivedAt":"2013-01-29T08:23:17Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jan 29, 2013 at 04:54:13PM +1100, Michael Tyson wrote:\n\n> I've a readonly git repository that I'm hosting via HTTP (a bare git\n> repository located within the appropriate directory on the server). I\n> push to it via my own SSH account (local repository with a remote\n> pointing to the ssh:// URL).\n> \n> This has all worked fine so far - I push via ssh, and others can clone\n> and pull via the HTTP URL.\n> \n> I've recently added a branch - \"beta\" - which pushed just fine, but\n> now cloning via the HTTP URL doesn't seem to show the new branch -\n> just master:\n\nIf you are using the \"dumb\" http protocol (i.e., the web server knows\nnothing about git, and just serves the repo files), you need to run \"git\nupdate-server-info\" after each push in order to update the static file\nthat tells the git client about each ref. You can have git do it\nautomatically for you by setting receive.updateServerInfo in the server\nrepo's config.\n\nIf the server is yours to control, consider setting up the \"smart\" http\nprotocol, as it is much more efficient. Details are in \"git help\nhttp-backend\".\n\n-Peff\n"},{"id":"208232","messageId":"C0C712AF-7EAF-4594-ACDB-27D7ADE9B49F@atastypixel.com","threadId":"32762","inReplyTo":"20130129082317.GA6396@sigill.intra.peff.net","subject":"Re: Cloning remote HTTP repository: Can only see 'master' branch","fromName":"Michael Tyson","fromEmail":"michael@atastypixel.com","sentAt":"2013-01-30T00:06:31Z","receivedAt":"2013-01-30T00:06:31Z","isPatch":false,"sender":{"key":"michael@atastypixel.com","avatar":null},"body":"Ah!  Lovely, thank you, Jeff!\n\nAlas, it's a shared server so I'm limited to what the host provides, but that solves my problem.\n\nCheers!\n\n\nOn 29 Jan 2013, at 19:23, Jeff King <peff@peff.net> wrote:\n\n> On Tue, Jan 29, 2013 at 04:54:13PM +1100, Michael Tyson wrote:\n> \n>> I've a readonly git repository that I'm hosting via HTTP (a bare git\n>> repository located within the appropriate directory on the server). I\n>> push to it via my own SSH account (local repository with a remote\n>> pointing to the ssh:// URL).\n>> \n>> This has all worked fine so far - I push via ssh, and others can clone\n>> and pull via the HTTP URL.\n>> \n>> I've recently added a branch - \"beta\" - which pushed just fine, but\n>> now cloning via the HTTP URL doesn't seem to show the new branch -\n>> just master:\n> \n> If you are using the \"dumb\" http protocol (i.e., the web server knows\n> nothing about git, and just serves the repo files), you need to run \"git\n> update-server-info\" after each push in order to update the static file\n> that tells the git client about each ref. You can have git do it\n> automatically for you by setting receive.updateServerInfo in the server\n> repo's config.\n> \n> If the server is yours to control, consider setting up the \"smart\" http\n> protocol, as it is much more efficient. Details are in \"git help\n> http-backend\".\n> \n> -Peff\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}