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 <chris@rorvick.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Chris Rorvick committed
Dec 17, 2012 at 00:45 UTC
00bb4378c788a6bd6e4fdbca1f9f70ec8c2fe30c
1 file changed
+8
Documentation/git-checkout.txt
+8
@@ -28,6 +28,14 @@ branch.
28
working tree are kept, so that they can be committed to the
29
<branch>.
30
+
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
++
39
You could omit <branch>, in which case the command degenerates to
40
"check out the current branch", which is a glorified no-op with a
41
rather expensive side-effects to show only the tracking information,