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

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

From
Jeff King <peff@peff.net>
Date
Jan 29, 2013, 08:23 UTC
Message-ID
<20130129082317.GA6396@sigill.intra.peff.net>
In-Reply-To
<83605E83-1110-449B-969D-AB43158376EA@atastypixel.com>
On Tue, Jan 29, 2013 at 04:54:13PM +1100, Michael Tyson wrote:
Show 11 quoted lines
> 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:

If you are using the "dumb" http protocol (i.e., the web server knows nothing about git, and just serves the repo files), you need to run "git update-server-info" after each push in order to update the static file that tells the git client about each ref. You can have git do it automatically for you by setting receive.updateServerInfo in the server repo's config.

If the server is yours to control, consider setting up the "smart" http protocol, as it is much more efficient. Details are in "git help http-backend".

-Peff
Previous: Michael TysonNext: Michael Tyson
Message 2 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.