Skip to content

Commit 565004b

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 73d24df commit 565004b

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
@@ -58,18 +58,17 @@ slower than getting the same information from `git status`.
5858
`--track` without `-b` implies branch creation; see the
5959
description of `--track` below.
6060
+
61-
If `-B` is given, _<new-branch>_ is created if it doesn't exist; otherwise, it
62-
is reset. This is the transactional equivalent of
61+
If `-B` is given, _<new-branch>_ is created if it doesn't exist;
62+
otherwise `<new-branch>` is forced to point at the commit. This is the
63+
transactional equivalent of
6364
+
6465
------------
6566
$ git branch -f <branch> [<start-point>]
6667
$ git checkout <branch>
6768
------------
6869
+
69-
that is to say, the branch is not reset/created unless "git checkout" is
70-
successful (e.g., when the branch is in use in another worktree, not
71-
just the current branch stays the same, but the branch is not reset to
72-
the start-point, either).
70+
that is, the branch will not be created or modified unless
71+
`git checkout` is successful.
7372
7473
`git checkout --detach [<branch>]`::
7574
`git checkout [--detach] <commit>`::

0 commit comments

Comments
 (0)