From: Junio C Hamano Date: Thu, 19 Jan 2023 17:12:41 +0000 (-0800) Subject: checkout: document -b/-B to highlight the differences from "git branch" X-Git-Tag: v2.40.0-rc0~46^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fedb8ea2df0325950285529b6e9e3f65cb227c67;p=thirdparty%2Fgit.git checkout: document -b/-B to highlight the differences from "git branch" 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 --- diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 4cb9d555b4..dcff44196d 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -146,14 +146,16 @@ on your side branch as `theirs` (i.e. "one contributor's work on top of it"). -b :: - Create a new branch named `` and start it at - ``; see linkgit:git-branch[1] for details. + Create a new branch named ``, start it at + ``, and check the resulting branch out; + see linkgit:git-branch[1] for details. -B :: - Creates the branch `` and start it at ``; - if it already exists, then reset it to ``. This is - equivalent to running "git branch" with "-f"; see - linkgit:git-branch[1] for details. + Creates the branch ``, start it at ``; + if it already exists, then reset it to ``. 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)]::