From: Jay Soffian Date: Mon, 16 Feb 2009 18:48:08 GMT Subject: Re: disallowing push to currently checked-out branch Message-ID: <76718490902161048i3c19bb43h30b1cfc62dd9a61e@mail.gmail.com> In-Reply-To: On Mon, Feb 16, 2009 at 12:43 PM, Johannes Schindelin wrote: > And of course, you need a way to show the user all the updates the branch > went through while the HEAD was detached, so that the user has a chance of > understanding what happened in the meantime. > > So much additional work, just to fix up the shortcomings of the 'detach' > paradigm? I take it as a clear mark of a not-so-elegant design. You did plant a seed in my head with PUSH_HEAD though, and I'm still thinking about it. :-) 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. Too bad clone doesn't set it up this way by default when cloning from a non-bare repo[*]. That would probably make more sense for new users. [*] Clone can't currently know it's cloning from a non-bare repo, at least via git://, as I recall... j.