{"thread":{"id":"13386","subject":"git checkout -b -f v1.5.5.1","startedAt":"2008-05-05T15:48:36Z","lastAt":"2008-05-05T16:09:45Z","messageCount":4,"participants":["Jun Ma","Stephan Beyer","Eric Hanchrow"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"76132","messageId":"dcf6addc0805050848v91589c6i6c2fca168b7644d5@mail.gmail.com","threadId":"13386","inReplyTo":null,"subject":"git checkout -b -f v1.5.5.1","fromName":"Jun Ma","fromEmail":"sync.jma@gmail.com","sentAt":"2008-05-05T15:48:36Z","receivedAt":"2008-05-05T15:48:36Z","isPatch":false,"sender":{"key":"sync.jma@gmail.com","avatar":null},"body":"Hi, all\n     I just mistaken 'git checkout -b 1.5.5.1 v1.5.5.1' to 'git\ncheckout -b -f v1.5.5.1', and I don't how to delete it ,\n\n  537  git-branch -D -f\n  538  git-branch -D \\-f\n  539  git-branch -D \"\\-f\"\n\n     all the above operations were failed. :(\n\n     PS: Would it be better if we do checking on branch name to avoid\nthis case?\n\n-- \nFIXME if it is wrong.\n"},{"id":"76133","messageId":"20080505155830.GC18443@leksak.fem-net","threadId":"13386","inReplyTo":"dcf6addc0805050848v91589c6i6c2fca168b7644d5@mail.gmail.com","subject":"Re: git checkout -b -f v1.5.5.1","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-05-05T15:58:30Z","receivedAt":"2008-05-05T15:58:30Z","isPatch":false,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hi,\n\n>      I just mistaken 'git checkout -b 1.5.5.1 v1.5.5.1' to 'git\n> checkout -b -f v1.5.5.1', and I don't how to delete it ,\n\nTry\n  git branch -D -- -f\n\n>   537  git-branch -D -f\n>   538  git-branch -D \\-f\n>   539  git-branch -D \"\\-f\"\n> \n>      all the above operations were failed. :(\n\nIn all cases, git-branch gets -f as parameter, because your shell \"expands\"\nthem to -f.\n\n> PS: Would it be better if we do checking on branch name to avoid this case?\n\nWhat do you want to check for?\nNo leading dashes?\n\n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"},{"id":"76135","messageId":"87zlr468n9.fsf@offby1.atm01.sea.blarg.net","threadId":"13386","inReplyTo":"dcf6addc0805050848v91589c6i6c2fca168b7644d5@mail.gmail.com","subject":"Re: git checkout -b -f v1.5.5.1","fromName":"Eric Hanchrow","fromEmail":"offby1@blarg.net","sentAt":"2008-05-05T16:03:06Z","receivedAt":"2008-05-05T16:03:06Z","isPatch":false,"sender":{"key":"eric.hanchrow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3145?v=4"},"body":"\n    Hi, all\n         I just mistaken 'git checkout -b 1.5.5.1 v1.5.5.1' to 'git\n    checkout -b -f v1.5.5.1', and I don't how to delete it ,\n\n      537  git-branch -D -f\n      538  git-branch -D \\-f\n      539  git-branch -D \"\\-f\"\n\n         all the above operations were failed. :(\n\n         PS: Would it be better if we do checking on branch name to avoid\n    this case?\n\nYou could probably just\n\n    rm .git/refs/heads/-f\n\nand if necessary, replace the content of .git/HEAD with something else.\n\n-- \nFIXME if it is wrong.\n\n-- \n\n                               _\n                              / )\n              (\\__/)         ( (\n              )    (          ) )\n            ={      }=       / /\n              )     `-------/ /\n             (               /\n              \\             )\n             ,'\\       ,    ,'\n             `-'\\  ,---\\   | \\\n                _) )    `. \\ /\n               (__/       ) )   hjw\n                         (_/\n"},{"id":"76136","messageId":"dcf6addc0805050909r65966e7bmd342c57443fd8c31@mail.gmail.com","threadId":"13386","inReplyTo":"20080505155830.GC18443@leksak.fem-net","subject":"Re: git checkout -b -f v1.5.5.1","fromName":"Jun Ma","fromEmail":"sync.jma@gmail.com","sentAt":"2008-05-05T16:09:45Z","receivedAt":"2008-05-05T16:09:45Z","isPatch":false,"sender":{"key":"sync.jma@gmail.com","avatar":null},"body":"On Mon, May 5, 2008 at 11:58 PM, Stephan Beyer <s-beyer@gmx.net> wrote:\n\n>  >      I just mistaken 'git checkout -b 1.5.5.1 v1.5.5.1' to 'git\n>  > checkout -b -f v1.5.5.1', and I don't how to delete it ,\n>\n>  Try\n>   git branch -D -- -f\n>\nIt works, thanks. :)\n\n\n>\n>  > PS: Would it be better if we do checking on branch name to avoid this case?\n>\n>  What do you want to check for?\n>  No leading dashes?\n>\nI thought it would be better do this job, so we won't get a\nmalformed(I thought '-f' is) branch name.:)\n\n\n-- \nFIXME if it is wrong.\n"}]}