Skip to content

Commit 360051d

Browse files
committed
doc: git-checkout: don't use "reset"
Many Git users don't know what the term "reset" means. Resolve this by: - Expanding it into its definition, in one case - Giving a simpler but still accurate explanation ("the branch will not be created or modified"), in the other case Signed-off-by: Julia Evans <[email protected]>
1 parent 23a7389 commit 360051d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Documentation/git-checkout.adoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,17 @@ to print out the tracking information for the current branch.
5454
`--track` without `-b` implies branch creation; see the
5555
description of `--track` below.
5656
+
57-
If `-B` is given, _<new-branch>_ is created if it doesn't exist; otherwise, it
58-
is reset. This is the transactional equivalent of
57+
If `-B` is given, _<new-branch>_ is created if it doesn't exist;
58+
otherwise `<new-branch>` is forced to point at the commit. This is the
59+
transactional equivalent of
5960
+
6061
------------
6162
$ git branch -f <branch> [<start-point>]
6263
$ git checkout <branch>
6364
------------
6465
+
65-
that is to say, the branch is not reset/created unless "git checkout" is
66-
successful (e.g., when the branch is in use in another worktree, not
67-
just the current branch stays the same, but the branch is not reset to
68-
the start-point, either).
66+
that is, the branch will not be created or modified unless
67+
`git checkout` is successful.
6968
7069
`git checkout --detach [<branch>]`::
7170
`git checkout [--detach] <commit>`::

0 commit comments

Comments
 (0)