{"thread":{"id":"59119","subject":"[PATCH] checkout: document -b/-B to highlight the differences from \"git branch\"","startedAt":"2023-01-19T17:12:45Z","lastAt":"2023-01-19T17:12:45Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"470714","messageId":"xmqqtu0m1m9i.fsf@gitster.g","threadId":"59119","inReplyTo":null,"subject":"[PATCH] checkout: document -b/-B to highlight the differences from \"git branch\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-01-19T17:12:41Z","receivedAt":"2023-01-19T17:12:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The existing text read as if \"git checkout -b/-B name\" were\nequivalent to \"git branch [-f] name\", which clearly was not\nwhat we wanted to say.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/git-checkout.txt | 14 ++++++++------\n 1 file changed, 8 insertions(+), 6 deletions(-)\n\ndiff --git i/Documentation/git-checkout.txt w/Documentation/git-checkout.txt\nindex 4cb9d555b4..dcff44196d 100644\n--- i/Documentation/git-checkout.txt\n+++ w/Documentation/git-checkout.txt\n@@ -146,14 +146,16 @@ on your side branch as `theirs` (i.e. \"one contributor's work on top\n of it\").\n \n -b <new-branch>::\n-\tCreate a new branch named `<new-branch>` and start it at\n-\t`<start-point>`; see linkgit:git-branch[1] for details.\n+\tCreate a new branch named `<new-branch>`, start it at\n+\t`<start-point>`, and check the resulting branch out;\n+\tsee linkgit:git-branch[1] for details.\n \n -B <new-branch>::\n-\tCreates the branch `<new-branch>` and start it at `<start-point>`;\n-\tif it already exists, then reset it to `<start-point>`. This is\n-\tequivalent to running \"git branch\" with \"-f\"; see\n-\tlinkgit:git-branch[1] for details.\n+\tCreates the branch `<new-branch>`, start it at `<start-point>`;\n+\tif it already exists, then reset it to `<start-point>`. And then\n+\tcheck the resulting branch out.  This is equivalent to running\n+\t\"git branch\" with \"-f\" followed by \"git checkout\" of that branch;\n+\tsee linkgit:git-branch[1] for details.\n \n -t::\n --track[=(direct|inherit)]::\n"}]}