git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How to manage heads on a remote repository?

From
David Symonds <dsymonds@gmail.com>
Date
Oct 14, 2007, 11:12 UTC
Message-ID
<ee77f5c20710140412s1eb68991ke552995dbbd226b@mail.gmail.com>
In-Reply-To
<20071014110714.GA17368@thunk.org>
On 14/10/2007, Theodore Tso <tytso@mit.edu> wrote:
Show 8 quoted lines
> On Sun, Oct 14, 2007 at 09:03:48PM +1000, David Symonds wrote:
> > git push <remote> :<branch_name>
> >
> > If the left side of the colon in a push refspec is empty, it deletes
> > the remote ref given by the right hand side.
>
> Cool, thanks!  It's not in the git-push man page.  I'll play with it
> some and then submit a patch update the man page.

Yes, it is, including in the examples section. Under the <refspec> options description it says:

  Pushing an empty <src> allows you to delete the <dst> ref from
  the remote repository.
In the examples section, it says:
  git push origin :experimental
         Find a ref that matches experimental in the origin repository
         (e.g. refs/heads/experimental), and delete it.
Dave.
Previous: Theodore TsoNext: Theodore Tso
Message 5 of 6 in “How to manage heads on a remote repository?”
  1. Theodore Ts'oOct 14, 2007
  2. Michael WittenOct 14, 2007
  3. David SymondsOct 14, 2007
  4. Theodore TsoOct 14, 2007
  5. David SymondsOct 14, 2007
  6. Theodore TsoOct 14, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.