@@ -11,6 +11,18 @@ diff" with:
11
11
$ man git-diff
12
12
------------------------------------------------
13
13
14
+ It is a good idea to introduce yourself to git before doing any
15
+ operation. The easiest way to do so is:
16
+
17
+ ------------------------------------------------
18
+ $ cat >~/.gitconfig <<\EOF
19
+ [user]
20
+ name = Your Name Comes Here
21
+
22
+ EOF
23
+ ------------------------------------------------
24
+
25
+
14
26
Importing a new project
15
27
-----------------------
16
28
@@ -31,7 +43,8 @@ defaulting to local storage area
31
43
32
44
You've now initialized the working directory--you may notice a new
33
45
directory created, named ".git". Tell git that you want it to track
34
- every file under the current directory with
46
+ every file under the current directory with (notice the dot '.'
47
+ that means the current directory):
35
48
36
49
------------------------------------------------
37
50
$ git add .
@@ -40,7 +53,7 @@ $ git add .
40
53
Finally,
41
54
42
55
------------------------------------------------
43
- $ git commit -a
56
+ $ git commit
44
57
------------------------------------------------
45
58
46
59
will prompt you for a commit message, then record the current state
@@ -55,11 +68,17 @@ $ git diff
55
68
to review your changes. When you're done,
56
69
57
70
------------------------------------------------
58
- $ git commit -a
71
+ $ git commit file1 file2...
59
72
------------------------------------------------
60
73
61
74
will again prompt your for a message describing the change, and then
62
- record the new versions of the modified files.
75
+ 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.
78
+
79
+ ------------------------------------------------
80
+ $ git commit -a
81
+ ------------------------------------------------
63
82
64
83
A note on commit messages: Though not required, it's a good idea to
65
84
begin the commit message with a single short (less than 50 character)
@@ -75,7 +94,7 @@ $ git add path/to/new/file
75
94
------------------------------------------------
76
95
77
96
then commit as usual. No special command is required when removing a
78
- file; just remove it, then commit.
97
+ file; just remove it, then tell ` commit` about the file as usual .
79
98
80
99
At any point you can view the history of your changes using
81
100
0 commit comments