Re: [PATCH] push: don't guess at qualifying remote refs on deletion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2012-07-03 at 14:40 -0400, Jeff King wrote:
> On Tue, Jul 03, 2012 at 02:34:59PM -0400, jonsmirl@xxxxxxxxx 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


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]