From: Junio C Hamano Date: Thu, 13 Nov 2008 06:14:15 GMT Subject: Re: [RFC PATCH 0/4] deny push to current branch of non-bare repo Message-ID: <7vhc6ci24o.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20081113053735.GA5343@coredump.intra.peff.net> Jeff King writes: > 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 Exactly. I keep a handful pseudo worktrees around (created with git-new-workdir on top of a single repository) for quick patch test and build purposes. I do not push into them but pushing into a non-bare repository and checking out the same branch twice in such a setup share exactly the same issue, and I keep their HEADs all detached for exactly the same reason.