* git checkout -b -f v1.5.5.1
@ 2008-05-05 15:48 Jun Ma
2008-05-05 15:58 ` Stephan Beyer
2008-05-05 16:03 ` Eric Hanchrow
0 siblings, 2 replies; 4+ messages in thread
From: Jun Ma @ 2008-05-05 15:48 UTC (permalink / raw)
To: git
Hi, all
I just mistaken 'git checkout -b 1.5.5.1 v1.5.5.1' to 'git
checkout -b -f v1.5.5.1', and I don't how to delete it ,
537 git-branch -D -f
538 git-branch -D \-f
539 git-branch -D "\-f"
all the above operations were failed. :(
PS: Would it be better if we do checking on branch name to avoid
this case?
--
FIXME if it is wrong.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git checkout -b -f v1.5.5.1
2008-05-05 15:48 git checkout -b -f v1.5.5.1 Jun Ma
@ 2008-05-05 15:58 ` Stephan Beyer
2008-05-05 16:09 ` Jun Ma
2008-05-05 16:03 ` Eric Hanchrow
1 sibling, 1 reply; 4+ messages in thread
From: Stephan Beyer @ 2008-05-05 15:58 UTC (permalink / raw)
To: Jun Ma; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 595 bytes --]
Hi,
> I just mistaken 'git checkout -b 1.5.5.1 v1.5.5.1' to 'git
> checkout -b -f v1.5.5.1', and I don't how to delete it ,
Try
git branch -D -- -f
> 537 git-branch -D -f
> 538 git-branch -D \-f
> 539 git-branch -D "\-f"
>
> all the above operations were failed. :(
In all cases, git-branch gets -f as parameter, because your shell "expands"
them to -f.
> PS: Would it be better if we do checking on branch name to avoid this case?
What do you want to check for?
No leading dashes?
--
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git checkout -b -f v1.5.5.1
2008-05-05 15:48 git checkout -b -f v1.5.5.1 Jun Ma
2008-05-05 15:58 ` Stephan Beyer
@ 2008-05-05 16:03 ` Eric Hanchrow
1 sibling, 0 replies; 4+ messages in thread
From: Eric Hanchrow @ 2008-05-05 16:03 UTC (permalink / raw)
To: git
Hi, all
I just mistaken 'git checkout -b 1.5.5.1 v1.5.5.1' to 'git
checkout -b -f v1.5.5.1', and I don't how to delete it ,
537 git-branch -D -f
538 git-branch -D \-f
539 git-branch -D "\-f"
all the above operations were failed. :(
PS: Would it be better if we do checking on branch name to avoid
this case?
You could probably just
rm .git/refs/heads/-f
and if necessary, replace the content of .git/HEAD with something else.
--
FIXME if it is wrong.
--
_
/ )
(\__/) ( (
) ( ) )
={ }= / /
) `-------/ /
( /
\ )
,'\ , ,'
`-'\ ,---\ | \
_) ) `. \ /
(__/ ) ) hjw
(_/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git checkout -b -f v1.5.5.1
2008-05-05 15:58 ` Stephan Beyer
@ 2008-05-05 16:09 ` Jun Ma
0 siblings, 0 replies; 4+ messages in thread
From: Jun Ma @ 2008-05-05 16:09 UTC (permalink / raw)
To: Jun Ma, git
On Mon, May 5, 2008 at 11:58 PM, Stephan Beyer <s-beyer@gmx.net> wrote:
> > I just mistaken 'git checkout -b 1.5.5.1 v1.5.5.1' to 'git
> > checkout -b -f v1.5.5.1', and I don't how to delete it ,
>
> Try
> git branch -D -- -f
>
It works, thanks. :)
>
> > PS: Would it be better if we do checking on branch name to avoid this case?
>
> What do you want to check for?
> No leading dashes?
>
I thought it would be better do this job, so we won't get a
malformed(I thought '-f' is) branch name.:)
--
FIXME if it is wrong.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-05 16:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-05 15:48 git checkout -b -f v1.5.5.1 Jun Ma
2008-05-05 15:58 ` Stephan Beyer
2008-05-05 16:09 ` Jun Ma
2008-05-05 16:03 ` Eric Hanchrow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox