From: Jay Soffian Date: Mon, 16 Feb 2009 21:12:58 GMT Subject: Re: disallowing push to currently checked-out branch Message-ID: <76718490902161312j2aee999bga00d95231fa85647@mail.gmail.com> In-Reply-To: On Mon, Feb 16, 2009 at 3:02 PM, Johannes Schindelin wrote: > Hi, > > On Mon, 16 Feb 2009, Jay Soffian wrote: > >> I think the right thing is *not to detach*, but rather when pushing >> into a non-bare repo for it to go into refs/remotes. > > I do not think that is consistent. Not consistent with what? So let's say I have a workstation and a laptop. The "sane" thing to do is probably something like this: workstation$ mkdir project && cd project && git init workstation$ (add, commit, ...) workstation$ git clone --bare . ../project.git workstation$ git remote add origin ../project.git laptop$ git clone ssh://workstation/~/project.git project And now I have two non-bare working repos with the intermediate bare repo. So at both ends I can push/pull in the way that the designers of git had in mind. :-) But I don't think this recipe is well documented for beginners. So they end up w/o the intermediate bare repository, and all the ensues. IOW, I think pushing into refs/remotes makes sense in the situation where the user has two non-bare repos that they want to exchange commits between. j.