Re: git with detached worktrees , push has no effect

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

 



On Fri, 2011-07-15 at 10:56 +0530, J. Bakshi wrote:
[snip]
> 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" ?

You may have figured this out already, but once you push, that branch
exists, so under those same rules, pushing to master will work from
there onwards.

If you were asking whether you can create an empty branch on the remote
you it works "automatically", then the answer is no, because a branch
doesn't exist[0] before its first commit. A branch is a reference to a
commit (which is, logically, considered the tip of that branch). Thus an
empty branch cannot exist before any commits are made to that branch.

[0] For the purposes of network transfer. The way to create the first
commit ever in a repo (or in an orphan branch) is to have HEAD point to
an as-of-yet nonexistent branch; but this won't help you in this case.

Cheers,
   cmn

Attachment: signature.asc
Description: This is a digitally signed message part


[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]