@@ -23,8 +23,8 @@ <h2>Getting and Creating Projects</h2>
23
23
< div class ="box ">
24
24
< h2 >
25
25
< span class ="docs ">
26
- < a href ="# "> docs</ a >
27
- < a href ="# "> book</ a >
26
+ < a target =" new " href ="http://www.kernel.org/pub/software/scm/git/docs/git-init.html "> docs</ a >
27
+ < a target =" new " href ="http://progit.org/book/ch2-1.html#initializing_a_repository_in_an_existing_directory "> book</ a >
28
28
</ span >
29
29
< a name ="init "> git init</ a >
30
30
< span class ="desc "> initializes a directory as a Git repository</ span >
63
63
Congratulations, you now have a skeleton Git repository and can start
64
64
snapshotting your project.
65
65
66
+ < p class ="nutshell ">
67
+ < strong > In a nutshell</ strong > , you use < code > git init</ code > to make an
68
+ existing directory of content into a new Git repository. You can do this
69
+ in any directory at any time, completely locally.</ p >
70
+
66
71
</ div >
67
72
</ div >
68
73
69
74
< div class ="box ">
70
75
< h2 >
71
76
< span class ="docs ">
72
- < a href ="# "> docs</ a >
73
- < a href ="# "> book</ a >
77
+ < a target =" new " href ="http://www.kernel.org/pub/software/scm/git/docs/git-clone.html "> docs</ a >
78
+ < a target =" new " href ="http://progit.org/book/ch2-1.html#cloning_an_existing_repository "> book</ a >
74
79
</ span >
75
80
< a name ="clone "> git clone</ a >
76
81
< span class ="desc "> copy a git repository so you can add to it</ span >
86
91
the URL of the project you want to copy.
87
92
</ p >
88
93
89
- < pre > [example] </ pre >
94
+ < pre >
95
+ < b > $ git clone git://github.com/schacon/simplegit.git</ b >
96
+ Initialized empty Git repository in /private/tmp/simplegit/.git/
97
+ remote: Counting objects: 100, done.
98
+ remote: Compressing objects: 100% (86/86), done.
99
+ remote: Total 100 (delta 35), reused 0 (delta 0)
100
+ Receiving objects: 100% (100/100), 9.51 KiB, done.
101
+ Resolving deltas: 100% (35/35), done.
102
+ < b > $ cd simplegit/</ b >
103
+ < b > $ ls</ b >
104
+ README Rakefile < span class ="blue "> lib</ span >
105
+ </ pre >
90
106
91
107
< p >
92
108
This will copy the entire history of that project so you have it locally
96
112
where all the project data is.
97
113
</ p >
98
114
99
- < pre > [example] </ pre >
115
+ < pre >
116
+ < b > $ ls -a</ b >
117
+ . .. < span class ="blue "> .git</ span > README Rakefile < span class ="blue "> lib</ span >
118
+ < b > $ cd .git</ b >
119
+ < b > $ ls</ b >
120
+ HEAD description < span class ="blue "> info</ span > packed-refs
121
+ < span class ="blue "> branches hooks logs refs</ span >
122
+ config index < span class ="blue "> objects</ span >
123
+ </ pre >
100
124
101
125
< p >
102
126
By default, Git will create a directory that is the same name as the
@@ -105,6 +129,11 @@ <h2>
105
129
end of the command, after the URL.
106
130
</ p >
107
131
132
+ < p class ="nutshell ">
133
+ < strong > In a nutshell</ strong > , you use < code > git clone</ code > to get a
134
+ local copy of a Git repository so you can look at it or start modifying
135
+ it.</ p >
136
+
108
137
</ div >
109
138
</ div >
110
139
0 commit comments