summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-01-19 17:12:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-01-19 17:44:08 (GMT)
commitfedb8ea2df0325950285529b6e9e3f65cb227c67 (patch)
tree53d7760977986a5896524d0640bac8d82edb00bb /Documentation
parent37537d6472d87098d455b6a0c36885997ea81a85 (diff)
downloadgit-fedb8ea2df0325950285529b6e9e3f65cb227c67.zip
git-fedb8ea2df0325950285529b6e9e3f65cb227c67.tar.gz
git-fedb8ea2df0325950285529b6e9e3f65cb227c67.tar.bz2
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 <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-checkout.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 4cb9d55..dcff441 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 <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)]::