From: "Carlos Martín Nieto" <cmn@elego.de>
To: "J. Bakshi" <joydeep@infoservices.in>
Cc: git@vger.kernel.org
Subject: Re: git with detached worktrees , push has no effect
Date: Thu, 14 Jul 2011 14:49:27 +0200 [thread overview]
Message-ID: <1310647767.6041.73.camel@centaur.lab.cmartin.tk> (raw)
In-Reply-To: <20110714181019.2453e3a8@shiva.selfip.org>
[-- Attachment #1: Type: text/plain, Size: 968 bytes --]
On Thu, 2011-07-14 at 18:10 +0530, J. Bakshi wrote:
[...] snip snip snip
> warning: You appear to have cloned an empty repository.
>
> touch A
> git add A
>
> git commit -m "add A"
>
> [master (root-commit) 7662edd] add A
> 0 files changed, 0 insertions(+), 0 deletions(-)
> create mode 100644 A
>
> git push
> Username:
> Password:
> Everything up-to-date
>
>
> Why reports [Everything up-to-date] rather than modify the remote git ?
That's because your remote repository has no branches and per default
git-push will only push matching branches; as no branches match, there
is nothing to do. This is what "warning: You appear to have cloned an
empty repository." is trying to tell you (the message could certainly be
made much more friendly). Your master branch in this case doesn't exist
in the server, so you have to tell git to push it explicitly.
git push origin master
will do the trick.
Cheers,
cmn
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2011-07-14 12:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-14 12:40 git with detached worktrees , push has no effect J. Bakshi
2011-07-14 12:49 ` Carlos Martín Nieto [this message]
2011-07-15 5:25 ` J. Bakshi
2011-07-15 5:26 ` J. Bakshi
2011-07-15 19:24 ` Carlos Martín Nieto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310647767.6041.73.camel@centaur.lab.cmartin.tk \
--to=cmn@elego.de \
--cc=git@vger.kernel.org \
--cc=joydeep@infoservices.in \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).