Subject: Re: git push from client is not updating files on server

From: Junio C Hamano <[email-masked]>
Date: Tue, 06 Mar 2012 11:35:16 -0800

[jc: resurrected JY as recipient]

Ben Tebulin <[email-masked]> writes:

> You can only push to "bare-only repositories". These do not contain a
> working tree but only a .git directory.

That's a bit too strong. You do not have to limit your "push" into
"bare repositories" (drop "-only", there is no such word), but it is
perfectly fine to use "push" as a way to emulate a "fetch" that you
would wish you could but you cannot in the opposite direction.

What "push" does not do is to touch the working tree, and this is
intuitively understandable once you realize that "push" is an
opposite of "fetch".

> My push seems to be successful too using the command below as I get
> the message "Everything up-to-date".
> 
> git push

It is somewhat strange that this _succeeded_.

When pushing into a repository with a working tree (i.e. "a non-bare
repository") and especially when trying to update its current branch
with such a push, "git push" would by default be refused, unless you
tweak a configuration variable or two on the receiving end.  That is
an expert feature and I do not think that is being in use in this
particular scenario, so perhaps the push did _not_ succeed to update
the branch Jerome thought it updated, but instead updated a branch
that is _not_ the one that is checked out in the repository on the
receiving end of this push.