From: Jeff King Date: Thu, 13 Nov 2008 05:37:35 GMT Subject: Re: [RFC PATCH 0/4] deny push to current branch of non-bare repo Message-ID: <20081113053735.GA5343@coredump.intra.peff.net> In-Reply-To: On Thu, Nov 13, 2008 at 12:22:20AM -0500, Kyle Moffett wrote: > somebody to push something for me to test, they push directly to that > repo, and when I'm done playing with a previous run I just do: > > $ git checkout new/branch/to/test > $ make clean > $ ./configure > $ make > $ make check OK, I see how using a detached HEAD makes sense. But I think just going straight to a detached HEAD might make even more sense. With your proposed behavior, you need to be prepared to unexpectedly and asynchronously move to a detached HEAD at any time, so why not just start there in the first place? And then the "push to current branch" problem is neatly solved: you have no current branch. So: $ git checkout new/branch/to/test^0 $ make, configure, etc -Peff