Re: [PATCH 2/2] git-init: set receive.guardCurrentBranch = true for non-bare repositories
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 24, 2008, 00:24 UTC
- Message-ID
- <7v4pax3r6l.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.LSU.1.00.0803232144070.4353@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> When initializing a non-bare repositories, you most likely want to avoid > pushing into the current branch (because a push does not touch the > working tree at all).
As I described in my other message, I suspect that treating the current branch specially like this is a wrong approach. The configuration might be a good idea, but shouldn't it prevent any local branch from getting updated? Push into non-bare repository is simply a fetch run in reverse direction.