git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Carlos Martín Nieto" <cmn@elego.de>
To: Jeff King <peff@peff.net>
Cc: "jonsmirl@gmail.com" <jonsmirl@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] push: don't guess at qualifying remote refs on deletion
Date: Wed, 04 Jul 2012 09:21:52 +0200	[thread overview]
Message-ID: <1341386512.3871.4.camel@flaca.cmartin.tk> (raw)
In-Reply-To: <20120703184018.GB5765@sigill.intra.peff.net>

On Tue, 2012-07-03 at 14:40 -0400, Jeff King wrote:
> On Tue, Jul 03, 2012 at 02:34:59PM -0400, jonsmirl@gmail.com wrote:
> 
> > > and now:
> > >
> > >   $ git push origin :bogus
> > >   error: unable to delete 'bogus': remote ref does not exist
> > >   error: failed to push some refs to '$URL'
> > 
> > This error return would have made my mistake obvious.
> 
> Thanks for confirming.
> 
> > Might want to add a paragraph to the doc saying this is how you delete
> > remote branches since it is not an obvious solution. I found it via
> > Google and a question asked on stackoverflow.com
> 
> It's already in git-push(1):
> 
>   OPTIONS
>      ...
>      <refspec>
>        ...
>        Pushing an empty <src> allows you to delete the <dst> ref from
>        the remote repository.
> 

There is also a flag you can pass, which you can see a few paragraphs
under it which. It explains what it does underneath but removes the need
to know that an empty source will delete the ref.

    --delete
       All listed refs are deleted from the remote repository. This is
       the same as prefixing all refs with a colon.

I suppose "delete" rather than "remove" as we have for remotes could
cause some confusion, as it's inconsistent, but it's all there in the
manpage.

   cmn

  parent reply	other threads:[~2012-07-04  7:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-03  3:09 How do I delete a remote branch with a period in the name? jonsmirl
2012-07-03  4:14 ` Junio C Hamano
2012-07-03 11:42   ` jonsmirl
2012-07-03 18:04     ` [PATCH] push: don't guess at qualifying remote refs on deletion Jeff King
2012-07-03 18:34       ` jonsmirl
2012-07-03 18:40         ` Jeff King
2012-07-03 18:43           ` jonsmirl
2012-07-03 19:35             ` Jeff King
2012-07-04  7:21           ` Carlos Martín Nieto [this message]
     [not found]             ` <CABURp0rVPAvxP1sp_nmoNYd+F+OsvWeHgUAeo7-VTnQhdebFeg@mail.gmail.com>
2012-07-05  7:22               ` Carlos Martín Nieto
2012-07-05 15:32                 ` Phil Hord
2012-07-05 17:24                   ` Carlos Martín Nieto
2012-07-05 17:26                   ` Junio C Hamano
2012-07-03 19:38       ` Junio C Hamano
2012-07-04  7:37         ` Jeff King
2012-07-03  7:56 ` How do I delete a remote branch with a period in the name? Andreas Schwab
2012-07-03 19:39   ` Junio C Hamano

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=1341386512.3871.4.camel@flaca.cmartin.tk \
    --to=cmn@elego.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jonsmirl@gmail.com \
    --cc=peff@peff.net \
    /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;
as well as URLs for NNTP newsgroup(s).