{"thread":{"id":"6546","subject":"git branch -D won't delete the branch you're on","startedAt":"2007-01-26T12:00:47Z","lastAt":"2007-01-26T12:00:47Z","messageCount":1,"participants":["Andy Parkins"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"32729","messageId":"200701261200.48813.andyparkins@gmail.com","threadId":"6546","inReplyTo":null,"subject":"git branch -D won't delete the branch you're on","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-01-26T12:00:47Z","receivedAt":"2007-01-26T12:00:47Z","isPatch":false,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"Hello,\n\nMinor nitpick, that is not dreadfully important, but now that we have the \ndetached HEAD facility, is it reasonable to expect this to work?\n\n $ git checkout -b somebranch HEAD^\n $ git branch -d somebranch\n error: Cannot delete the branch 'testcvs' which you are currently on.\n\nEspecially given that this will work (albeit with a warning):\n\n $ git checkout HEAD^\n warning: you are not on ANY branch anymore.\n If you meant to create a new branch from the commit, you need -b to\n associate a new branch with the wanted checkout.  Example:\n   git checkout -b <new_branch_name> HEAD^\n\n\n\n\nAndy\n-- \nDr Andy Parkins, M Eng (hons), MIEE\nandyparkins@gmail.com\n"}]}