From 1e2ccd3abc8f5d96244806f753568493c3e77d4c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 12 Dec 2005 23:24:06 -0800 Subject: Documentation: more examples. Signed-off-by: Junio C Hamano --- Documentation/git-checkout.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Documentation/git-checkout.txt') diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index b7bb1b4c74..9442c66b18 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 -- cgit v1.2.1