Skip to content

Commit 84dee6b

Browse files
bfieldsJunio C Hamano
authored andcommitted
Documentation: tutorial editing
Edit for conciseness. Add a "Making changes" section header. When possible, make sure that stuff in text boxes could be entered literally. (Don't use "..." unless we want a user to type that.) Move 'commit -a' example into a literal code section, clarify that it finds modified files automatically. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 2eff142 commit 84dee6b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Documentation/tutorial.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ Initialized empty Git repository in .git/
4343

4444
You've now initialized the working directory--you may notice a new
4545
directory created, named ".git". Tell git that you want it to track
46-
every file under the current directory with (notice the dot '.'
47-
that means the current directory):
46+
every file under the current directory (note the '.') with:
4847

4948
------------------------------------------------
5049
$ git add .
@@ -59,6 +58,9 @@ $ git commit
5958
will prompt you for a commit message, then record the current state
6059
of all the files to the repository.
6160

61+
Making changes
62+
--------------
63+
6264
Try modifying some files, then run
6365

6466
------------------------------------------------
@@ -70,19 +72,21 @@ want the updated contents of these files in the commit and then
7072
make a commit, like this:
7173

7274
------------------------------------------------
73-
$ git add file1 file...
75+
$ git add file1 file2 file3
7476
$ git commit
7577
------------------------------------------------
7678

7779
This will again prompt your for a message describing the change, and then
78-
record the new versions of the files you listed. It is cumbersome
79-
to list all files and you can say `git commit -a` (which stands for 'all')
80-
instead of running `git add` beforehand.
80+
record the new versions of the files you listed.
81+
82+
Alternatively, instead of running `git add` beforehand, you can use
8183

8284
------------------------------------------------
8385
$ git commit -a
8486
------------------------------------------------
8587

88+
which will automatically notice modified (but not new) files.
89+
8690
A note on commit messages: Though not required, it's a good idea to
8791
begin the commit message with a single short (less than 50 character)
8892
line summarizing the change, followed by a blank line and then a more

0 commit comments

Comments
 (0)