{"thread":{"id":"10110","subject":"Problems setting up bare repository (git 1.5.3.3)","startedAt":"2007-10-01T21:46:36Z","lastAt":"2007-10-02T21:02:19Z","messageCount":18,"participants":["Barry Fishman","Junio C Hamano","Carl Worth","J. Bruce Fields","Shawn O. Pearce","Johannes Schindelin","Sean"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"54506","messageId":"m3fy0u7bk3.fsf@barry_fishman.acm.org","threadId":"10110","inReplyTo":null,"subject":"Problems setting up bare repository (git 1.5.3.3)","fromName":"Barry Fishman","fromEmail":"barry_fishman@acm.org","sentAt":"2007-10-01T21:46:36Z","receivedAt":"2007-10-01T21:46:36Z","isPatch":false,"sender":{"key":"barry_fishman@acm.org","avatar":"https://gravatar.com/avatar/4844db8f23c87ef393afd071604bce66ae3f30c5ddd3e9002eced18b7884fa46?d=mp&s=160"},"body":"Using the 1.5.3.3 release:\n\n$ cd /pub/git\n$ mkdir foo.git\n$ cd foo.git\n$ git --bare init\nInitialized empty Git repository in /pub/git/foo.git/\n$ git --bare branch\n\nNote that there is no master branch.\n\n$ cd /some/git/workdir\n$ git push /pub/git/foo.git master:master\nerror: dst refspec master does not match any existing ref on the remote and does not start with refs/.\nfatal: The remote end hung up unexpectedly\nerror: failed to push to '/pub/git/foo.git'\n\n$ git push --force /pub/git/foo.git master:master\nerror: dst refspec master does not match any existing ref on the remote and does not start with refs/.\nfatal: The remote end hung up unexpectedly\nerror: failed to push to '/pub/git/foo.git'\n\n$ git push --all /pub/git/foo.git\nupdating 'refs/heads/master'\n  from 0000000000000000000000000000000000000000\n  to   e623fb5ba6fac345eb6af552b40412acdc447b31\nGenerating pack...\nDone counting 61 objects.\nDeltifying 61 objects...\n 100% (61/61) done\nWriting 61 objects...\nUnpacking 61 objects...\n 100% (61/61) done\nTotal 61 (delta 31), reused 50 (delta 25)\n 100% (61/61) done\nrefs/heads/master: 0000000000000000000000000000000000000000 -> e623fb5ba6fac345eb6af552b40412acdc447b31\n\nBut what if I have more branches and want to just push the master\nbranch?  This worked when I tried it last (probably 1.5.2.2).  This time\nI had to \"git push --all\" and then delete all the unwanted branches.\n\n-- \nBarry Fishman\n"},{"id":"54512","messageId":"7vejgeqxd1.fsf@gitster.siamese.dyndns.org","threadId":"10110","inReplyTo":"m3fy0u7bk3.fsf@barry_fishman.acm.org","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-10-01T22:32:58Z","receivedAt":"2007-10-01T22:32:58Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Barry Fishman <barry_fishman@acm.org> writes:\n\n> $ git push --force /pub/git/foo.git master:master\n> error: dst refspec master does not match any existing ref on the remote and does not start with refs/.\n> fatal: The remote end hung up unexpectedly\n> error: failed to push to '/pub/git/foo.git'\n\nRead BOTH OF the error messages.  Especially the first one.\n\nThis error message is telling you that the dst side of the\nrefspec you supplied (that's the second 'master' in\n\"master:master\") does not exist there, and we do not create it\nunless you give a full refname that begins with refs/ (so that\npush can tell if you want to create a tag or a branch).\n\n$ git push /pub/git/foo.git master:refs/heads/master\n\nwould have worked, without --force.\n"},{"id":"54514","messageId":"87bqbisae6.wl%cworth@cworth.org","threadId":"10110","inReplyTo":"7vejgeqxd1.fsf@gitster.siamese.dyndns.org","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Carl Worth","fromEmail":"cworth@cworth.org","sentAt":"2007-10-01T23:06:09Z","receivedAt":"2007-10-01T23:06:09Z","isPatch":false,"sender":{"key":"cworth@cworth.org","avatar":"https://gravatar.com/avatar/3746dc28cde609bdbd7f939058356e7e2bbd16d21e32274df0725eb3d998bc5b?d=mp&s=160"},"body":"On Mon, 01 Oct 2007 15:32:58 -0700, Junio C Hamano wrote:\n> \"master:master\") does not exist there, and we do not create it\n> unless you give a full refname that begins with refs/ (so that\n> push can tell if you want to create a tag or a branch).\n\nAnd why is that?\n\nWhy isn't pushing a branch interpreted as wanting to create a branch\nand pushing a tag interpreted as wanting to create a tag unless git is\ntold differently?\n\n> $ git push /pub/git/foo.git master:refs/heads/master\n\nI mean, it's nice that the advanced user can get all specific and\ninvoke the low-level refs/heads/ thing here. But what I'd really like\nto have instead is just:\n\n$ git push /pub/git/foo.git master\n\nIs there any reason that that shouldn't be interpreted as\n\"master:master\" and that that would in turn be interpreted as \"create\na remote refs/heads/master\" ?\n\nThat would really be much kinder for new users.\n\n-Carl\n\nPS. As someone who has written some new-user documentation for git,\nthere are a few low-level git notions that I would like to avoid in\nthat documentation. For example, one is FETCH_HEAD. In my first\nattempt at porting hgbook-chapter2 to git I found myself using\nFETCH_HEAD to simulate \"hg incoming\". Thankfully, I was able to\nrewrite it by taking advantage of remotes and using \"master..origin\"\ninstead.\n\nAnother example is \"refs/heads\". I avoided this partially by inly\ndocumenting how to push all branches with \"--all\", but I'd much rather\nbe able to say that the user could git push URL branch\nanother-branch...\" or \"git push URL --all\" for convenience. Finally,\ngit-push itself spews quite a bit of output with \"refs/heads\" in it\nthat I don't think is useful at all. For talking with the user, git\nshould say \"branch master\" not \"refs/heads/master\".\n"},{"id":"54517","messageId":"20071001231714.GB5556@fieldses.org","threadId":"10110","inReplyTo":"87bqbisae6.wl%cworth@cworth.org","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2007-10-01T23:17:14Z","receivedAt":"2007-10-01T23:17:14Z","isPatch":false,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Mon, Oct 01, 2007 at 04:06:09PM -0700, Carl Worth wrote:\n> Another example is \"refs/heads\". I avoided this partially by inly\n> documenting how to push all branches with \"--all\", but I'd much rather\n> be able to say that the user could git push URL branch\n> another-branch...\" or \"git push URL --all\" for convenience. Finally,\n> git-push itself spews quite a bit of output with \"refs/heads\" in it\n> that I don't think is useful at all. For talking with the user, git\n> should say \"branch master\" not \"refs/heads/master\".\n\nI'd be nervous about skipping discussion of the refs/ namespace.  Sure,\nintroduce branch heads and tags on their own first, but you've got to\nmention the rest pretty early on.  Eventually anyone can find themselves\nwith a tags, heads, and remotes with the same names, and then it's easy\nto get stuck if you don't have a way to disambiguate.\n\nAnd, really, it doesn't take that much space to explain this stuff.\n\n--b.\n"},{"id":"54518","messageId":"7v641qquzq.fsf@gitster.siamese.dyndns.org","threadId":"10110","inReplyTo":"87bqbisae6.wl%cworth@cworth.org","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-10-01T23:24:09Z","receivedAt":"2007-10-01T23:24:09Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Carl Worth <cworth@cworth.org> writes:\n\n> On Mon, 01 Oct 2007 15:32:58 -0700, Junio C Hamano wrote:\n>> \"master:master\") does not exist there, and we do not create it\n>> unless you give a full refname that begins with refs/ (so that\n>> push can tell if you want to create a tag or a branch).\n>\n> And why is that?\n\nI think Daniel's rewrite of remote ref matching code that has\nbeen cooking in 'next' changes the match semantics of the remote\nside in subtle way to make it easier to favor branches when\npushing branches, but I juggle many topics and I have to go back\nto the code to make sure.  Since you are interested, and more\nimportantly since I know you are capable to do the digging\nyourself, I won't be doing the digging myself immediately,\nthough.\n"},{"id":"54521","messageId":"20071001233546.GG2137@spearce.org","threadId":"10110","inReplyTo":"87bqbisae6.wl%cworth@cworth.org","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-10-01T23:35:46Z","receivedAt":"2007-10-01T23:35:46Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Carl Worth <cworth@cworth.org> wrote:\n> $ git push /pub/git/foo.git master\n> \n> Is there any reason that that shouldn't be interpreted as\n> \"master:master\" and that that would in turn be interpreted as \"create\n> a remote refs/heads/master\" ?\n\nThis is actually read more as:\n\n 1) Expand \"master\" to \"refs/heads/master\"\n 2) Expand \"refs/heads/master\" to \"refs/heads/master:refs/heads/master\"\n\nWe first try to expand the local name to an \"absolute\" local name,\nthen if the remote name is missing default it to the same as the\n(now expanded) local name.  So \"push origin master\" is not read as\n\"push origin refs/haeds/master:master\".\n\n> PS. As someone who has written some new-user documentation for git,\n> there are a few low-level git notions that I would like to avoid in\n> that documentation. For example, one is FETCH_HEAD. In my first\n> attempt at porting hgbook-chapter2 to git I found myself using\n> FETCH_HEAD to simulate \"hg incoming\". Thankfully, I was able to\n> rewrite it by taking advantage of remotes and using \"master..origin\"\n> instead.\n\nHow about:\n\n  git config alias.incoming 'log ..FETCH_HEAD'\n\n?  Or do we need --reverse in there too to simulate \"hg incoming\"?\nThe thing is, FETCH_HEAD is a lot more powerful than a tracking\nbranch.  It can contain objects randomly pulled from another\nrepository (e.g. one shot pulls).\n \n> Another example is \"refs/heads\". I avoided this partially by inly\n> documenting how to push all branches with \"--all\", but I'd much rather\n> be able to say that the user could git push URL branch\n> another-branch...\" or \"git push URL --all\" for convenience. Finally,\n> git-push itself spews quite a bit of output with \"refs/heads\" in it\n> that I don't think is useful at all. For talking with the user, git\n> should say \"branch master\" not \"refs/heads/master\".\n\nAgreed.  We do that in fetch.  We should do that in push.  We should\nonly mention \"refs/*\" if the user is pushing something funny, e.g.\npushing into the remote tracking branch space.  Or the stash.  Etc.\nTags and normal branches should be denoted as such.\n\n-- \nShawn.\n"},{"id":"54522","messageId":"878x6ms8hn.wl%cworth@cworth.org","threadId":"10110","inReplyTo":"7v641qquzq.fsf@gitster.siamese.dyndns.org","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Carl Worth","fromEmail":"cworth@cworth.org","sentAt":"2007-10-01T23:47:16Z","receivedAt":"2007-10-01T23:47:16Z","isPatch":false,"sender":{"key":"cworth@cworth.org","avatar":"https://gravatar.com/avatar/3746dc28cde609bdbd7f939058356e7e2bbd16d21e32274df0725eb3d998bc5b?d=mp&s=160"},"body":"On Mon, 01 Oct 2007 16:24:09 -0700, Junio C Hamano wrote:\n> I think Daniel's rewrite of remote ref matching code that has\n> been cooking in 'next' changes the match semantics of the remote\n> side in subtle way to make it easier to favor branches when\n> pushing branches, but I juggle many topics and I have to go back\n> to the code to make sure.  Since you are interested, and more\n> importantly since I know you are capable to do the digging\n> yourself, I won't be doing the digging myself immediately,\n> though.\n\nGreat. I'll go looking for that.\n\nAnd if I don't find what I'm thinking of there, I'll see if I can't\ncook up something else myself.\n\nThanks again,\n\n-Carl\n"},{"id":"54547","messageId":"Pine.LNX.4.64.0710021045430.28395@racer.site","threadId":"10110","inReplyTo":"87bqbisae6.wl%cworth@cworth.org","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-02T09:46:56Z","receivedAt":"2007-10-02T09:46:56Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 1 Oct 2007, Carl Worth wrote:\n\n> On Mon, 01 Oct 2007 15:32:58 -0700, Junio C Hamano wrote:\n> > \"master:master\") does not exist there, and we do not create it\n> > unless you give a full refname that begins with refs/ (so that\n> > push can tell if you want to create a tag or a branch).\n> \n> And why is that?\n\nWell, if the OP had used \"git push <bla> master\" instead of \n\"... master:master\", it would have worked.  I am unaware of any tutorial \nthat suggests the latter, only of tutorials that suggest the former.\n\nCiao,\nDscho\n"},{"id":"54561","messageId":"m34ph9tye1.fsf@barry_fishman.acm.org","threadId":"10110","inReplyTo":"Pine.LNX.4.64.0710021045430.28395@racer.site","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Barry Fishman","fromEmail":"barry_fishman@acm.org","sentAt":"2007-10-02T13:54:46Z","receivedAt":"2007-10-02T13:54:46Z","isPatch":false,"sender":{"key":"barry_fishman@acm.org","avatar":"https://gravatar.com/avatar/4844db8f23c87ef393afd071604bce66ae3f30c5ddd3e9002eced18b7884fa46?d=mp&s=160"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> Well, if the OP had used \"git push <bla> master\" instead of \n> \"... master:master\", it would have worked.  I am unaware of any tutorial \n> that suggests the latter, only of tutorials that suggest the former.\n\nI did recheck the tutorials, and did not find the code I was\nusing.  So there was nothing incorrect in the documentation.\n\nAs for \"master working where \"master:master\" didn't, this only exposes a\nmore complex set of rules.  I was not hoping for a more complex set of\nrules to learn, as GIT tried to figure out what I meant.  I was hoping\nfor a simpler command that did what I told it to do, and I was given it\nby Junio Hamano.\n\nWhat distracted me was that after the \"git --bare init\", there seemed to\nbe a incompletely defined setup.  This sent me down the wrong path.\n\nAlthough there was a master branch to which HEAD pointed, there was no\nref/heads/master file or even a \"packed-refs\".  This also confuses the\nthe \"git branch\" command, so that when I initial tried \"git --bare\nbranch\" it seemed unaware of any master branch.  I then tried:\n\n$ git --bare branch refs/heads/master\nfatal: Not a valid object name: 'master'.\n\nIf there isn't an initial master branch, then shouldn't \"git branch\" be\nable to create one.  And if there is one, shouldn't the automatic rules\nexplained in git-rev-parse man page find it?  The error messages from\nthe branch command is what got me on the wrong logical path.\n\nThe man page for git-init says:\n\n  This command creates an empty git repository - basically a .git directory\n  with subdirectories for objects, refs/heads, refs/tags, and template\n  files. An initial HEAD file that references the HEAD of the master branch\n  is also created.\n\nWhich is true, but although there is a HEAD that references the\nmaster branch, there isn't really any master branch.  It might\nsay something like:\n\n  This command creates an empty git repository - basically a .git directory\n  with subdirectories for objects, refs/heads, refs/tags, and template\n  files. An initial HEAD file references the refs/heads/master branch\n  which is created with the first commit.\n\nThis would at least somewhat explain \"git branch\" results.\n\nThe man page for git-push seems clear to me now.  I should have\nmore closely read the last example.  The first example might\nbe changed to say:\n\ngit push origin master\n    Find a ref that matches master in the source repository (most\n    likely, it would find refs/heads/master), and update (or create) the\n    same ref, refs/heads/master, in the origin repository with it.\n\n-- \nBarry Fishman\n"},{"id":"54564","messageId":"87641psey8.wl%cworth@cworth.org","threadId":"10110","inReplyTo":"Pine.LNX.4.64.0710021045430.28395@racer.site","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Carl Worth","fromEmail":"cworth@cworth.org","sentAt":"2007-10-02T15:39:59Z","receivedAt":"2007-10-02T15:39:59Z","isPatch":false,"sender":{"key":"cworth@cworth.org","avatar":"https://gravatar.com/avatar/3746dc28cde609bdbd7f939058356e7e2bbd16d21e32274df0725eb3d998bc5b?d=mp&s=160"},"body":"On Tue, 2 Oct 2007 10:46:56 +0100 (BST), Johannes Schindelin wrote:\n> On Mon, 1 Oct 2007, Carl Worth wrote:\n> > And why is that?\n>\n> Well, if the OP had used \"git push <bla> master\" instead of\n> \"... master:master\", it would have worked.  I am unaware of any tutorial\n> that suggests the latter, only of tutorials that suggest the former.\n\nOK. I was wrong. Somehow I got stuck thinking that \"git push <bla>\nmaster\" wouldn't create a new remote master branch if it didn't\npreviously exist. (It's bizarre that I forgot since I've used that for\na long time).\n\nSorry about the noise.\n\n-Carl\n"},{"id":"54571","messageId":"Pine.LNX.4.64.0710021834470.28395@racer.site","threadId":"10110","inReplyTo":"m34ph9tye1.fsf@barry_fishman.acm.org","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-02T17:40:20Z","receivedAt":"2007-10-02T17:40:20Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\n[please do not cull me from the Cc: list, especially when you are quoting \nme]\n\nOn Tue, 2 Oct 2007, Barry Fishman wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> > Well, if the OP had used \"git push <bla> master\" instead of \"... \n> > master:master\", it would have worked.  I am unaware of any tutorial \n> > that suggests the latter, only of tutorials that suggest the former.\n> \n> I did recheck the tutorials, and did not find the code I was\n> using.  So there was nothing incorrect in the documentation.\n\nGood.  Just for my curiousity: where in the documentation did you look for \nhelp?  (We might want to advertise \"git push <nick> <branch>\" more loudly \nthere.)\n\n> What distracted me was that after the \"git --bare init\", there seemed to \n> be a incompletely defined setup.  This sent me down the wrong path.\n> \n> Although there was a master branch to which HEAD pointed, there was no\n> ref/heads/master file or even a \"packed-refs\".\n\nThat means that there was no master branch.  Before the first commit, a \nbranch does not exist.  We are stricter in that regard than other SCMs.\n\n> If there isn't an initial master branch, then shouldn't \"git branch\" be\n> able to create one.\n\nWhy?  I really do not see the point in creating a branch which is named \ndifferent than \"master\", when you have nothing to begin with.\n\nJust use \"master\".  As easy as that.\n\nIf you really have to paint the bike shed, you can always rename your \nbranch later, when you got something, by \"git branch -m <new-branch-name>\".\n\n>   This command creates an empty git repository - basically a .git directory\n>   with subdirectories for objects, refs/heads, refs/tags, and template\n>   files. An initial HEAD file references the refs/heads/master branch\n>   which is created with the first commit.\n\nHow about \"Your first commit will create the master branch\" instead of the \nlast sentence?\n\nCiao,\nDscho\n"},{"id":"54573","messageId":"Pine.LNX.4.64.0710021841300.28395@racer.site","threadId":"10110","inReplyTo":"87641psey8.wl%cworth@cworth.org","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-02T17:45:40Z","receivedAt":"2007-10-02T17:45:40Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 2 Oct 2007, Carl Worth wrote:\n\n> On Tue, 2 Oct 2007 10:46:56 +0100 (BST), Johannes Schindelin wrote:\n> > On Mon, 1 Oct 2007, Carl Worth wrote:\n> > > And why is that?\n> >\n> > Well, if the OP had used \"git push <bla> master\" instead of \"... \n> > master:master\", it would have worked.  I am unaware of any tutorial \n> > that suggests the latter, only of tutorials that suggest the former.\n> \n> OK. I was wrong. Somehow I got stuck thinking that \"git push <bla> \n> master\" wouldn't create a new remote master branch if it didn't \n> previously exist. (It's bizarre that I forgot since I've used that for a \n> long time).\n> \n> Sorry about the noise.\n\nNothing to be sorry about.  It got me thinking.  People propose that \"git \npush <nick> master:blub\" should create the branch \"refs/heads/blub\" on the \nremote side.\n\nMy initial reaction was \"then you have to be precise, because we do not \nknow if you want to push it as a branch, or as a lightweight tag\".\n\nBut then I stepped back a little: What is most likely meant when you say \n\"master:blub\" and there is no tag/branch of name \"blub\" on the remote \nside?  Exactly, you want a branch to be created.\n\n_Except_ if you had a typo, such as \"git push ko master:po\" where you want \nto be warned that that ref is not present on the remote side.\n\nSo I am less opposed to making \"master:blub\" automatically create a branch \n\"blub\" if it does not exist yet.  But opposed nevertheless.\n\nCiao,\nDscho\n"},{"id":"54577","messageId":"7vwsu5l6j8.fsf@gitster.siamese.dyndns.org","threadId":"10110","inReplyTo":"Pine.LNX.4.64.0710021841300.28395@racer.site","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-10-02T18:23:39Z","receivedAt":"2007-10-02T18:23:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> But then I stepped back a little: What is most likely meant when you say \n> \"master:blub\" and there is no tag/branch of name \"blub\" on the remote \n> side?  Exactly, you want a branch to be created.\n\nIt's not that \"exactly\" for me.\n\nIf your push were \"next~27^2:frotz\", it becomes even less clear.\nIt may be that I am pushing out the tip of a topic branch I\nusually do not push out, so it would be easier for some specific\nperson to build on top of.  Or maybe I am marking that place as\na lightweight tag.  They are equally likely.\n\nOn the other hand, what the user wants to do with \"git push\n$elsewhere frob\" is reasonably clear.  If frob is locally a\nbranch, then the branch is pushed out.  If frob is a tag, the\ntag is propagated.\n"},{"id":"54581","messageId":"BAYC1-PASMTP05AB6AE16E90C15710819EAEAE0@CEZ.ICE","threadId":"10110","inReplyTo":"7vwsu5l6j8.fsf@gitster.siamese.dyndns.org","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2007-10-02T18:55:56Z","receivedAt":"2007-10-02T18:55:56Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Tue, 02 Oct 2007 11:23:39 -0700\nJunio C Hamano <gitster@pobox.com> wrote:\n\n> If your push were \"next~27^2:frotz\", it becomes even less clear.\n> It may be that I am pushing out the tip of a topic branch I\n> usually do not push out, so it would be easier for some specific\n> person to build on top of.  Or maybe I am marking that place as\n> a lightweight tag.  They are equally likely.\n\nBut you could pick a reasonable default in assuming that a new\nbranch is desired with the above example.  If someone wants to\npush a tag, they can create the tag locally, and then push it.\n\nSean\n"},{"id":"54582","messageId":"7vfy0tl4fd.fsf@gitster.siamese.dyndns.org","threadId":"10110","inReplyTo":"BAYC1-PASMTP05AB6AE16E90C15710819EAEAE0@CEZ.ICE","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-10-02T19:09:10Z","receivedAt":"2007-10-02T19:09:10Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sean <seanlkml@sympatico.ca> writes:\n\n> On Tue, 02 Oct 2007 11:23:39 -0700\n> Junio C Hamano <gitster@pobox.com> wrote:\n>\n>> If your push were \"next~27^2:frotz\", it becomes even less clear.\n>> It may be that I am pushing out the tip of a topic branch I\n>> usually do not push out, so it would be easier for some specific\n>> person to build on top of.  Or maybe I am marking that place as\n>> a lightweight tag.  They are equally likely.\n>\n> But you could pick a reasonable default in assuming that a new\n> branch is desired with the above example.  If someone wants to\n> push a tag, they can create the tag locally, and then push it.\n\nI think you are on the same page.\n\nWe can pick _a_ default, and tell people that if they want a\nnon-default behaviour, they have to be explicit.  That goes\nwithout saying.\n\nThe discussion between Johannes and I was about picking what\ndefault is _reasonable_; Johannes made it sound like branches\nare norm and tags are oddball.  I was merely pointing out that\nit won't be so cut-and-dried.\n"},{"id":"54605","messageId":"m37im5qoky.fsf@barry_fishman.acm.org","threadId":"10110","inReplyTo":"Pine.LNX.4.64.0710021834470.28395@racer.site","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Barry Fishman","fromEmail":"barry_fishman@acm.org","sentAt":"2007-10-02T19:54:53Z","receivedAt":"2007-10-02T19:54:53Z","isPatch":false,"sender":{"key":"barry_fishman@acm.org","avatar":"https://gravatar.com/avatar/4844db8f23c87ef393afd071604bce66ae3f30c5ddd3e9002eced18b7884fa46?d=mp&s=160"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Tue, 2 Oct 2007, Barry Fishman wrote:\n>\n>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>> > Well, if the OP had used \"git push <bla> master\" instead of \"... \n>> > master:master\", it would have worked.  I am unaware of any tutorial \n>> > that suggests the latter, only of tutorials that suggest the former.\n>> \n>> I did recheck the tutorials, and did not find the code I was\n>> using.  So there was nothing incorrect in the documentation.\n>\n> Good.  Just for my curiousity: where in the documentation did you look for \n> help?  (We might want to advertise \"git push <nick> <branch>\" more loudly \n> there.)\n\nI'm not sure, but I think I got the idea from:\n  http://www.kernel.org/pub/software/scm/git/docs/cvs-migration.html\nwhich does a fetch while in the bare repository rather than a push into\nit:\n\n  $ mkdir /pub/my-repo.git\n  $ cd /pub/my-repo.git\n  $ git --bare init --shared\n  $ git --bare fetch /home/alice/myproject master:master\n\nThat series of commands works.\n\n>> If there isn't an initial master branch, then shouldn't \"git branch\" be\n>> able to create one.\n>\n> Why?  I really do not see the point in creating a branch which is named \n> different than \"master\", when you have nothing to begin with.\n\nYou are right, of course.  I was just following a line of thought, not\nimplying that creating such a branch was ever reasonable to do.\n\n>>   This command creates an empty git repository - basically a .git directory\n>>   with subdirectories for objects, refs/heads, refs/tags, and template\n>>   files. An initial HEAD file references the refs/heads/master branch\n>>   which is created with the first commit.\n>\n> How about \"Your first commit will create the master branch\" instead of the \n> last sentence?\n\nYes.  Less wobbly than how I worded it.\n\n-- \nBarry Fishman\n"},{"id":"54604","messageId":"Pine.LNX.4.64.0710022159090.28395@racer.site","threadId":"10110","inReplyTo":"BAYC1-PASMTP05AB6AE16E90C15710819EAEAE0@CEZ.ICE","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-02T20:59:52Z","receivedAt":"2007-10-02T20:59:52Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 2 Oct 2007, Sean wrote:\n\n> On Tue, 02 Oct 2007 11:23:39 -0700\n> Junio C Hamano <gitster@pobox.com> wrote:\n> \n> > If your push were \"next~27^2:frotz\", it becomes even less clear. It \n> > may be that I am pushing out the tip of a topic branch I usually do \n> > not push out, so it would be easier for some specific person to build \n> > on top of.  Or maybe I am marking that place as a lightweight tag.  \n> > They are equally likely.\n> \n> But you could pick a reasonable default in assuming that a new branch is \n> desired with the above example.  If someone wants to push a tag, they \n> can create the tag locally, and then push it.\n\nAnd if someone wants to push a branch, they can create the branch locally, \nand then push it.  (Your last sentence with s/tag/branch/g applied.)\n\nCiao,\nDscho\n"},{"id":"54608","messageId":"Pine.LNX.4.64.0710022200000.28395@racer.site","threadId":"10110","inReplyTo":"7vfy0tl4fd.fsf@gitster.siamese.dyndns.org","subject":"Re: Problems setting up bare repository (git 1.5.3.3)","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-10-02T21:02:19Z","receivedAt":"2007-10-02T21:02:19Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 2 Oct 2007, Junio C Hamano wrote:\n\n> The discussion between Johannes and I was about picking what default is \n> _reasonable_; Johannes made it sound like branches are norm and tags are \n> oddball.  I was merely pointing out that it won't be so cut-and-dried.\n\nActually, I had Carl Worth in mind when I asked the (rhetorical) question \nwhat is meant by \"master:blub\".  And I think Carl agrees that he would \nexpect it to create a new branch.\n\nHowever, as I hope I made clear that I do not think that a DWIMery would \ndo good here.  IOW I vote for keeping the existing behaviour (otherwise \nyou'd have seen a patch from me, too).\n\nCiao,\nDscho\n"}]}