Re: [RFC PATCH 0/4] deny push to current branch of non-bare repo
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 13, 2008, 06:14 UTC
- Message-ID
- <7vhc6ci24o.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20081113053735.GA5343@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
> 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.