Git development
 help / color / mirror / Atom feed
* Delete branch start with "-"
@ 2009-04-09 12:28 Yoann Hervé
  2009-04-09 13:12 ` Björn Steinbrink
  0 siblings, 1 reply; 2+ messages in thread
From: Yoann Hervé @ 2009-04-09 12:28 UTC (permalink / raw)
  To: git

Hello,
by mistake I have created a branch with a "-" at the beginning of his 
name, and now I can't delete it.

 git branch -d -f
 error: unknown switch `s'
 usage: git-branch [options] [-r | -a] [--merged | --no-merged]
    or: git-branch [options] [-l] [-f] <branchname> [<start-point>]
    or: git-branch [options] [-r] (-d | -D) <branchname>
    or: git-branch [options] (-m | -M) [<oldbranch>] <newbranch>

 Generic options
     -v, --verbose         be verbose
     --track               set up tracking mode (see git-pull(1))
     --color               use colored output
     -r                    act on remote-tracking branches
     --contains <commit>   print only branches that contain the commit
     --abbrev[=<n>]        use <n> digits to display SHA-1s

 Specific git-branch actions:
     -a                    list both remote-tracking and local branches
     -d                    delete fully merged branch
     -D                    delete branch (even if not merged)
     -m                    move/rename a branch and its reflog
     -M                    move/rename a branch, even if target exists
     -l                    create the branch's reflog
     -f                    force creation (when already exists)
     --merged              list only merged branches

How can I delete it ?

Thanks,
Yoann

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Delete branch start with "-"
  2009-04-09 12:28 Delete branch start with "-" Yoann Hervé
@ 2009-04-09 13:12 ` Björn Steinbrink
  0 siblings, 0 replies; 2+ messages in thread
From: Björn Steinbrink @ 2009-04-09 13:12 UTC (permalink / raw)
  To: Yoann Hervé; +Cc: git

On 2009.04.09 14:28:48 +0200, Yoann Hervé wrote:
> Hello,
> by mistake I have created a branch with a "-" at the beginning of his  
> name, and now I can't delete it.
>
> git branch -d -f
>
> error: unknown switch `s'

Uhm, that error message doesn't fit the command... Anyway, use -- to
separate the branch name from the options:

git branch -d -- -f

Björn

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-09 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-09 12:28 Delete branch start with "-" Yoann Hervé
2009-04-09 13:12 ` Björn Steinbrink

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox