Git development
 help / color / mirror / Atom feed
From: P Rouleau <prouleau72@gmail.com>
To: git@vger.kernel.org
Subject: Re: Git shouldn't allow to push a new branch called HEAD
Date: Fri, 14 Oct 2011 23:00:04 +0000 (UTC)	[thread overview]
Message-ID: <loom.20111015T004856-72@post.gmane.org> (raw)
In-Reply-To: 1318591877.2938.20.camel@mastroc3.mobc3.local

Daniele Segato <daniele.segato <at> gmail.com> writes:

> 
> Hi all,
> 
> following from a discussion in IRC freenode #git between me, sitaram an
> shruggar
> 
> step to reproduce:
> 
> $ # time to create the remote HEAD branch
> $ cd buggenerator/
> $ git push origin HEAD:HEAD
> 
> But I think that git shouldn't allow the remote HEAD reference to be
> created in the first place

Maybe git should also refuse to create a local branch named HEAD. I made a
mistake recently where I used something likes this:

for B in $(git branch -a|grep "remotes/origin/"); do git co -t $B ; done

After that, git st was giving a warning about an ambiguous HEAD ref. Hopefully,
a simple "git branch -d HEAD" fixed it once I found the problem.

P.Rouleau

      parent reply	other threads:[~2011-10-14 23:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-14 11:31 Git shouldn't allow to push a new branch called HEAD Daniele Segato
2011-10-14 11:35 ` Daniele Segato
2011-11-14  9:07   ` Daniele Segato
2011-11-14 10:45     ` Michael Haggerty
2011-11-14 11:16       ` Jeff King
2011-11-14 20:22         ` Junio C Hamano
2011-11-14 20:26           ` Jeff King
2011-10-14 23:00 ` P Rouleau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20111015T004856-72@post.gmane.org \
    --to=prouleau72@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox