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>
J. Bruce Fields committed
Jan 6, 2007 at 22:38 UTC
84dee6bbc9eb6dd8e613414ed0271d8290549e89
1 file changed
+10
-6
Documentation/tutorial.txt
+10
-6
@@ -43,8 +43,7 @@ Initialized empty Git repository in .git/
43
44
You've now initialized the working directory--you may notice a new
45
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:
47
48
------------------------------------------------
49
$ git add .
@@ -59,6 +58,9 @@ $ git commit
58
will prompt you for a commit message, then record the current state
59
of all the files to the repository.
60
61
+Making changes
62
+--------------
63
+
64
Try modifying some files, then run
65
66
------------------------------------------------
@@ -70,19 +72,21 @@ want the updated contents of these files in the commit and then
72
make a commit, like this:
73
74
------------------------------------------------
73
-$ git add file1 file...
75
+$ git add file1 file2 file3
76
$ git commit
77
------------------------------------------------
78
79
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
83
84
------------------------------------------------
85
$ git commit -a
86
------------------------------------------------
87
88
+which will automatically notice modified (but not new) files.
89
+
90
A note on commit messages: Though not required, it's a good idea to
91
begin the commit message with a single short (less than 50 character)
92
line summarizing the change, followed by a blank line and then a more