PageRenderTime 18ms CodeModel.GetById 9ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/workbook/htmls/06-Cloning_and_Remotes.html

http://github.com/matthewmccullough/git-workshop
HTML | 50 lines | 30 code | 20 blank | 0 comment | 0 complexity | bf7ebb06e335cd589d612e4ac42ae399 MD5 | raw file
 1<link rel="stylesheet" type="text/css" media="screen"  href="css/screen.css" />
 2
 3<h1>Cloning Basics</h1>
 4
 5<h2>Cloning someone else's Git protocol-hosted repo</h2>
 6
 7<p>List of Git-hosted projects</p>
 8
 9<pre><code>http://git.apache.org
10</code></pre>
11
12<p>Get a full copy of a Git project</p>
13
14<pre><code>git clone git://git.apache.org/commons-logging.git
15</code></pre>
16
17<p>or the <a href="http://github.com/grails/grails-core">Grails project</a>, which has several branches:</p>
18
19<pre><code>git clone http://github.com/grails/grails-core.git
20git clone git://github.com/grails/grails-core.git
21</code></pre>
22
23<h2>Cloning an HTTP repo</h2>
24
25<p>Apache also is pushing nightly syncs to GitHub</p>
26
27<pre><code>http://github.com/apache/commons-logging
28</code></pre>
29
30<p>Clone from GitHub (can be forked)</p>
31
32<pre><code>git clone http://github.com/apache/commons-logging.git
33</code></pre>
34
35<h2>Remotes</h2>
36
37<p>Show all remotes' simple names</p>
38
39<pre><code>git remote
40</code></pre>
41
42<p>Show remotes with URLs</p>
43
44<pre><code>git remote -v
45</code></pre>
46
47<p>Add a new remote</p>
48
49<pre><code>git remote add NAME URL
50</code></pre>