Subject: Re: Deleting remote branches

From: Peter Baumann <[email-masked]>
Date: Fri, 26 Mar 2010 07:16:52 +0100

On Thu, Mar 25, 2010 at 10:09:03PM -0800, jhapk wrote:
> 
> Hi,
> 
> I have tried that and I get the following message
> 
> [pradeep@scaramanga cffc]$ git push origin:test
                                      ^^^^^^^^^^^

Notice the missing space. From the git push manpage:

git push origin :experimental
               ^
    Find a ref that matches experimental in the origin repository (e.g.
    refs/heads/experimental), and delete it.

The syntax (with all the unused stuff removed) is 'git push <repository> <refspec>'
If you don't supply any repository (as you did with your cmdline), the default 
remote repository is used. Your command tried to push the local branch 'origin' into
the remote branch 'test' of your default remote repository. Correct would be

git push :test   # or git push origin :test

The refspec :test means push empy/nothingness into the branch 'test', which will delete it.

--
Peter