threads / discuss / 29463

Cloning bare repository always warns that its empty.

Subject: Cloning bare repository always warns that its empty.

## tl;dr

2 messages between Jan 29, 2012 and Jan 29, 2012.

replies: 1people: 2as markdown or json

nmartin· Jan 29, 2012, 03:09 UTC · lore
Hello..

I created a bare repository (empty) on my server which I making public over http. I cloned this repository on another machine(A), committed changes, and pushed the changes to the server. On the server when I run $ git log I can see the commit that I pushed. However if I clone this repository on a 3rd machine(B).. the repository is empty.

Can someone to me what I am doing wrong? I would expect the pushed changes to have been brought down to machine B.

Thanks!

-- View this message in context: http://git.661346.n2.nabble.com/Cloning-bare-repository-always-warns-that-its-empty-tp7233455p7233455.html Sent from the git mailing list archive at Nabble.com.

Jeff King· Jan 29, 2012, 03:24 UTC · re: nmartin · lore

Re: Cloning bare repository always warns that its empty.

On Sat, Jan 28, 2012 at 07:09:21PM -0800, nmartin wrote:
Show 5 quoted lines
> I created a bare repository (empty) on my server which I making public over
> http. I cloned this repository on another machine(A), committed changes, and
> pushed the changes to the server. On the server when I run $ git log I can
> see the commit that I pushed. However if I clone this repository on a 3rd
> machine(B).. the repository is empty.

Is your http server git-aware (i.e., running the smart-git http-backend CGI), or it is simply serving the repository files? If the latter, then you need to arrange to run the "git update-server-info" when you push into it, which will update the information that "dumb" http clients will look at.

If the server is running git v1.6.6 or later, you can turn this on in the server repository by running:

  git config receive.updateserverinfo true
-Peff

← back to recent threads