* git branch -D won't delete the branch you're on
@ 2007-01-26 12:00 Andy Parkins
0 siblings, 0 replies; only message in thread
From: Andy Parkins @ 2007-01-26 12:00 UTC (permalink / raw)
To: git
Hello,
Minor nitpick, that is not dreadfully important, but now that we have the
detached HEAD facility, is it reasonable to expect this to work?
$ git checkout -b somebranch HEAD^
$ git branch -d somebranch
error: Cannot delete the branch 'testcvs' which you are currently on.
Especially given that this will work (albeit with a warning):
$ git checkout HEAD^
warning: you are not on ANY branch anymore.
If you meant to create a new branch from the commit, you need -b to
associate a new branch with the wanted checkout. Example:
git checkout -b <new_branch_name> HEAD^
Andy
--
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-26 12:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-26 12:00 git branch -D won't delete the branch you're on Andy Parkins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).