Re: git with detached worktrees , push has no effect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 14 Jul 2011 14:49:27 +0200
Carlos Martín Nieto <cmn@xxxxxxxx> wrote:

> 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.
> 

Great !!

Working like a charm and the hook is also working fine. Can we make the 
empty master branch at the server, so that client can continue with plain "git push" ?

Thanks
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]