User manual: fix typos in examples
Correct command line examples of repo-config, format-patch and am. A full object name is 40-hexdigit; it may be 20-byte but 20-digit is misleading. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Jan 10, 2007 at 18:11 UTC
eb6ae7f4ad565d56501e9e20a8bac5c579d50f84
1 file changed
+26
-10
Documentation/user-manual.txt
+26
-10
@@ -161,7 +161,7 @@ index 8be626f..d7aac9d 100644
161
As you can see, a commit shows who made the latest change, what they
162
did, and why.
163
164
-Every commit has a 20-digit id, sometimes called the "SHA1 id", shown
164
+Every commit has a 40-hexdigit id, sometimes called the "SHA1 id", shown
165
on the first line of the "git show" output. You can usually refer to
166
a commit by a shorter name, such as a tag or a branch name, but this
167
longer id can also be useful. In particular, it is a globally unique
@@ -486,7 +486,7 @@ create similar configuration options to save typing; for example,
486
after
487
488
-------------------------------------------------
489
-$ git repo-config remote.example.url=git://example.com/proj.git
489
+$ git repo-config remote.example.url git://example.com/proj.git
490
-------------------------------------------------
491
492
then the following two commands will do the same thing:
@@ -499,7 +499,7 @@ $ git fetch example master:refs/remotes/example/master
499
Even better, if you add one more option:
500
501
-------------------------------------------------
502
-$ git repo-config remote.example.fetch=master:refs/remotes/example/master
502
+$ git repo-config remote.example.fetch master:refs/remotes/example/master
503
-------------------------------------------------
504
505
then the following commands will all do the same thing:
@@ -514,7 +514,7 @@ $ git fetch example
514
You can also add a "+" to force the update each time:
515
516
-------------------------------------------------
517
-$ git repo-config +master:ref/remotes/example/master
517
+$ git repo-config remote.example.fetch +master:ref/remotes/example/master
518
-------------------------------------------------
519
520
Don't do this unless you're sure you won't mind "git fetch" possibly
@@ -613,7 +613,7 @@ Naming commits
613
614
We have seen several ways of naming commits already:
615
616
- - 20-digit SHA1 id
616
+ - 40-hexdigit SHA1 id
617
- branch name: refers to the commit at the head of the given
618
branch
619
- tag name: refers to the commit pointed to by the given tag
@@ -621,7 +621,7 @@ We have seen several ways of naming commits already:
621
<<how-git-stores-references,references>>).
622
- HEAD: refers to the head of the current branch
623
624
-There are many more; see the "SPECIFYING REVISION" section of the
624
+There are many more; see the "SPECIFYING REVISIONS" section of the
625
gitlink:git-rev-parse[1] man page for the complete list of ways to
626
name revisions. Some examples:
627
@@ -867,6 +867,14 @@ By default, the content of the index is identical to that of the
867
HEAD. The command "git diff --cached" shows the difference between
868
HEAD and the index, so you should no output from that command.
869
870
+////////////////////////////////////////////////
871
+
872
+This is talking about not "by default", but "when you start
873
+out". The last sentence does not parse for me...
874
+
875
+////////////////////////////////////////////////
876
+
877
+
878
Modifying the index is easy:
879
880
To update the index with the new contents of a modified file, use
@@ -881,8 +889,7 @@ To add the contents of a new file to the index, use
889
$ git add path/to/file
890
-------------------------------------------------
891
884
-To remove a file from the index that you've removed from the working
885
-tree,
892
+To remove a file from the index and from the working tree,
893
894
-------------------------------------------------
895
$ git rm path/to/file
@@ -1306,7 +1313,7 @@ just be to send them as patches in email:
1313
First, use gitlink:git-format-patches[1]; for example:
1314
1315
-------------------------------------------------
1309
-$ git format-patches origin
1316
+$ git format-patch origin
1317
-------------------------------------------------
1318
1319
will produce a numbered series of files in the current directory, one
@@ -1327,9 +1334,18 @@ Just save all of the patch-containing messages, in order, into a
1334
single mailbox file, say "patches.mbox", then run
1335
1336
-------------------------------------------------
1330
-$ git am patches.mbox
1337
+$ git am -3 patches.mbox
1338
-------------------------------------------------
1339
1340
+////////////////////////////////////////////////
1341
+
1342
+If you allow git-am to fall back to 3-way merge with -3, you
1343
+would see conflicts and "resolving a merge" techniques apply.
1344
+Otherwise "conflicts" will just fail the patch and your working
1345
+tree and index are left untouched.
1346
+
1347
+////////////////////////////////////////////////
1348
+
1349
Git will apply each patch in order; if any conflicts are found, it
1350
will stop, and you can fix the conflicts as described in
1351
"<<resolving-a-merge,Resolving a merge>>". Once the index is updated