Skip to content

Commit 00bb437

Browse files
crorvickgitster
authored andcommitted
Documentation/git-checkout.txt: document 70c9ac2 behavior
Document the behavior implemented in 70c9ac2 (DWIM "git checkout frotz" to "git checkout -b frotz origin/frotz"). Signed-off-by: Chris Rorvick <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e1cdf63 commit 00bb437

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Documentation/git-checkout.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ branch.
2828
working tree are kept, so that they can be committed to the
2929
<branch>.
3030
+
31+
If <branch> is not found but there does exist a tracking branch in
32+
exactly one remote (call it <remote>) with a matching name, treat as
33+
equivalent to
34+
+
35+
------------
36+
$ git checkout -b <branch> --track <remote>/<branch>
37+
------------
38+
+
3139
You could omit <branch>, in which case the command degenerates to
3240
"check out the current branch", which is a glorified no-op with a
3341
rather expensive side-effects to show only the tracking information,

0 commit comments

Comments
 (0)