# Cloning bare repository always warns that its empty.

2 messages from 2012-01-29 to 2012-01-29. Participants: nmartin, Jeff King.
Thread: https://gitlist.dev/t/29463

## nmartin, 2012-01-29 03:09

Subject: Cloning bare repository always warns that its empty.
Message-ID: <1327806561158-7233455.post@n2.nabble.com>
URL: https://gitlist.dev/e/1327806561158-7233455.post%40n2.nabble.com

```
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, 2012-01-29 03:24

Subject: Re: Cloning bare repository always warns that its empty.
Message-ID: <20120129032458.GB1347@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20120129032458.GB1347%40sigill.intra.peff.net
In-Reply-To: <1327806561158-7233455.post@n2.nabble.com>

```
On Sat, Jan 28, 2012 at 07:09:21PM -0800, nmartin wrote:

> 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

```
