Chris Rorvick  committed 00bb437

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 <>
Signed-off-by: Junio C Hamano <>

  • Participants
  • Parent commits e1cdf63

Comments (0)

Files changed (1)

File Documentation/git-checkout.txt

 	working tree are kept, so that they can be committed to the
+If <branch> is not found but there does exist a tracking branch in
+exactly one remote (call it <remote>) with a matching name, treat as
+equivalent to
+$ git checkout -b <branch> --track <remote>/<branch>
 You could omit <branch>, in which case the command degenerates to
 "check out the current branch", which is a glorified no-op with a
 rather expensive side-effects to show only the tracking information,