@matheusbsbs / matheus-bagliano / commits / 71bb10336f
Fork 0

Rewrite synopsis to clarify the two primary uses of git-checkout.

Fix a few typo/grammar problems. Signed-off-by: Jon Loeliger <jdl@jdl.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jon Loeliger committed Mar 17, 2006 at 18:26 UTC 71bb10336fa79ff667f4753668aaa72b6ebfc689
1 file changed +13 -10
Documentation/git-checkout.txt
+13 -10
@@ -7,15 +7,18 @@ git-checkout - Checkout and switch to a branch
7
8 SYNOPSIS
9 --------
10 -'git-checkout' [-f] [-b <new_branch>] [-m] [<branch>] [<paths>...]
10 +[verse]
11 +'git-checkout' [-f] [-b <new_branch>] [-m] [<branch>]
12 +'git-checkout' [-m] [<branch>] <paths>...
13
14 DESCRIPTION
15 -----------
16
15 -When <paths> are not given, this command switches branches, by
17 +When <paths> are not given, this command switches branches by
18 updating the index and working tree to reflect the specified
19 branch, <branch>, and updating HEAD to be <branch> or, if
18 -specified, <new_branch>.
20 +specified, <new_branch>. Using -b will cause <new_branch> to
21 +be created.
22
23 When <paths> are given, this command does *not* switch
24 branches. It updates the named paths in the working tree from
@@ -29,17 +32,17 @@ given paths before updating the working tree.
32 OPTIONS
33 -------
34 -f::
32 - Force an re-read of everything.
35 + Force a re-read of everything.
36
37 -b::
38 Create a new branch and start it at <branch>.
39
40 -m::
38 - If you have local modifications to a file that is
39 - different between the current branch and the branch you
40 - are switching to, the command refuses to switch
41 - branches, to preserve your modifications in context.
42 - With this option, a three-way merge between the current
41 + If you have local modifications to one or more files that
42 + are different between the current branch and the branch to
43 + which you are switching, the command refuses to switch
44 + branches in order to preserve your modifications in context.
45 + However, with this option, a three-way merge between the current
46 branch, your working tree contents, and the new branch
47 is done, and you will be on the new branch.
48 +
@@ -82,7 +85,7 @@ $ git checkout -- hello.c
85 ------------
86
87 . After working in a wrong branch, switching to the correct
85 -branch you would want to is done with:
88 +branch would be done using:
89 +
90 ------------
91 $ git checkout mytopic