Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rorvick <chris@rorvick.com>2012-12-17 10:45:02 +0400
committerJunio C Hamano <gitster@pobox.com>2012-12-18 23:07:44 +0400
commit00bb4378c788a6bd6e4fdbca1f9f70ec8c2fe30c (patch)
tree60d3eacb263e709e8aa151f8227f80000dc5cb72 /Documentation/git-checkout.txt
parente1cdf63316348332e4e267aeaab5b510beae0227 (diff)
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>
Diffstat (limited to 'Documentation/git-checkout.txt')
-rw-r--r--Documentation/git-checkout.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index ad33eb49ae..6f04d22f5e 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -28,6 +28,14 @@ branch.
working tree are kept, so that they can be committed to the
<branch>.
+
+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,