summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-01-30 22:24:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-01-30 22:24:21 (GMT)
commit06f2b5fb70747413c1892263bacf602d0fbcc2fa (patch)
tree6ae73debdce62bb5a768fc91325bd2a0c75e6daa
parent5cc9858f1b470844dea5c5d3e936af183fdf2c68 (diff)
parentfedb8ea2df0325950285529b6e9e3f65cb227c67 (diff)
downloadgit-06f2b5fb70747413c1892263bacf602d0fbcc2fa.zip
git-06f2b5fb70747413c1892263bacf602d0fbcc2fa.tar.gz
git-06f2b5fb70747413c1892263bacf602d0fbcc2fa.tar.bz2
Merge branch 'jc/doc-checkout-b'
Clarify how "checkout -b/-B" and "git branch [-f]" are similar but different in the documentation. * jc/doc-checkout-b: checkout: document -b/-B to highlight the differences from "git branch"
-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 9f116ac..6bb32ab 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)]::