]> git.ipfire.org Git - thirdparty/git.git/commitdiff
checkout: document -b/-B to highlight the differences from "git branch"
authorJunio C Hamano <gitster@pobox.com>
Thu, 19 Jan 2023 17:12:41 +0000 (09:12 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 19 Jan 2023 17:44:08 +0000 (09:44 -0800)
The existing text read as if "git checkout -b/-B name" were
equivalent to "git branch [-f] name", which clearly was not
what we wanted to say.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-checkout.txt

index 4cb9d555b4b436ae6aef8e14c1729599da0d74e8..dcff44196d4cc2cfa636e6be266a4db0ead38692 100644 (file)
@@ -146,14 +146,16 @@ on your side branch as `theirs` (i.e. "one contributor's work on top
 of it").
 
 -b <new-branch>::
-       Create a new branch named `<new-branch>` and start it at
-       `<start-point>`; see linkgit:git-branch[1] for details.
+       Create a new branch named `<new-branch>`, start it at
+       `<start-point>`, and check the resulting branch out;
+       see linkgit:git-branch[1] for details.
 
 -B <new-branch>::
-       Creates the branch `<new-branch>` and start it at `<start-point>`;
-       if it already exists, then reset it to `<start-point>`. This is
-       equivalent to running "git branch" with "-f"; see
-       linkgit:git-branch[1] for details.
+       Creates the branch `<new-branch>`, start it at `<start-point>`;
+       if it already exists, then reset it to `<start-point>`. And then
+       check the resulting branch out.  This is equivalent to running
+       "git branch" with "-f" followed by "git checkout" of that branch;
+       see linkgit:git-branch[1] for details.
 
 -t::
 --track[=(direct|inherit)]::