Skip to content

Commit c1d179f

Browse files
author
Junio C Hamano
committed
tutorial: misc updates.
Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent f3a4740 commit c1d179f

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

Documentation/tutorial.txt

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,19 @@ Try modifying some files, then run
6565
$ git diff
6666
------------------------------------------------
6767

68-
to review your changes. When you're done,
68+
to review your changes. When you're done, tell git that you
69+
want the updated contents of these files in the commit and then
70+
make a commit, like this:
6971

7072
------------------------------------------------
71-
$ git commit file1 file2...
73+
$ git add file1 file...
74+
$ git commit
7275
------------------------------------------------
7376

74-
will again prompt your for a message describing the change, and then
77+
This will again prompt your for a message describing the change, and then
7578
record the new versions of the files you listed. It is cumbersome
76-
to list all files and you can say `-a` (which stands for 'all')
77-
instead.
79+
to list all files and you can say `git commit -a` (which stands for 'all')
80+
instead of running `git add` beforehand.
7881

7982
------------------------------------------------
8083
$ git commit -a
@@ -84,7 +87,7 @@ A note on commit messages: Though not required, it's a good idea to
8487
begin the commit message with a single short (less than 50 character)
8588
line summarizing the change, followed by a blank line and then a more
8689
thorough description. Tools that turn commits into email, for
87-
example, use the first line on the Subject line and the rest of the
90+
example, use the first line on the Subject: line and the rest of the
8891
commit in the body.
8992

9093

@@ -142,6 +145,13 @@ If you also want to see complete diffs at each step, use
142145
$ git log -p
143146
------------------------------------------------
144147

148+
Often the overview of the change is useful to get a feel of
149+
each step
150+
151+
------------------------------------------------
152+
$ git log --stat --summary
153+
------------------------------------------------
154+
145155
Managing branches
146156
-----------------
147157

@@ -381,7 +391,7 @@ commit.
381391
$ git show c82a22c39cbc32576f64f5c6b3f24b99ea8149c7
382392
-------------------------------------
383393

384-
But there other ways to refer to commits. You can use any initial
394+
But there are other ways to refer to commits. You can use any initial
385395
part of the name that is long enough to uniquely identify the commit:
386396

387397
-------------------------------------

0 commit comments

Comments
 (0)