summaryrefslogtreecommitdiff
path: root/Documentation/git-checkout.txt
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-13 07:24:06 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-12-13 07:24:06 (GMT)
commit1e2ccd3abc8f5d96244806f753568493c3e77d4c (patch)
tree524282ab2ba2d33192eceac97968eb61307c6c5a /Documentation/git-checkout.txt
parent180c4746479892a9e58918b0d45f89911cb48716 (diff)
downloadgit-1e2ccd3abc8f5d96244806f753568493c3e77d4c.zip
git-1e2ccd3abc8f5d96244806f753568493c3e77d4c.tar.gz
git-1e2ccd3abc8f5d96244806f753568493c3e77d4c.tar.bz2
Documentation: more examples.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation/git-checkout.txt')
-rw-r--r--Documentation/git-checkout.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index b7bb1b4..9442c66 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -50,10 +50,14 @@ the `Makefile` to two revisions back, deletes hello.c by
mistake, and gets it back from the index.
------------
-$ git checkout master
-$ git checkout master~2 Makefile
+$ git checkout master <1>
+$ git checkout master~2 Makefile <2>
$ rm -f hello.c
-$ git checkout hello.c
+$ git checkout hello.c <3>
+
+<1> switch branch
+<2> take out a file out of other commit
+<3> or "git checkout -- hello.c", as in the next example.
------------
If you have an unfortunate branch that is named `hello.c`, the