X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=Documentation%2Fgit-checkout.txt;h=9442c66b18bb2a1dc578a9ff604fcb0009e3ed1e;hb=50b4e0c178777a27164eb67676593255a9cbd035;hp=b7bb1b4c74ad3f0e06ddf23487b7735cb321952b;hpb=1301c6eb412e7c5511b952a12e42c70ad56f028b;p=git.git diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index b7bb1b4c..9442c66b 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