/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. <h1>Cloning Basics</h1>
  3. <h2>Cloning someone else's Git protocol-hosted repo</h2>
  4. <p>List of Git-hosted projects</p>
  5. <pre><code>http://git.apache.org
  6. </code></pre>
  7. <p>Get a full copy of a Git project</p>
  8. <pre><code>git clone git://git.apache.org/commons-logging.git
  9. </code></pre>
  10. <p>or the <a href="http://github.com/grails/grails-core">Grails project</a>, which has several branches:</p>
  11. <pre><code>git clone http://github.com/grails/grails-core.git
  12. git clone git://github.com/grails/grails-core.git
  13. </code></pre>
  14. <h2>Cloning an HTTP repo</h2>
  15. <p>Apache also is pushing nightly syncs to GitHub</p>
  16. <pre><code>http://github.com/apache/commons-logging
  17. </code></pre>
  18. <p>Clone from GitHub (can be forked)</p>
  19. <pre><code>git clone http://github.com/apache/commons-logging.git
  20. </code></pre>
  21. <h2>Remotes</h2>
  22. <p>Show all remotes' simple names</p>
  23. <pre><code>git remote
  24. </code></pre>
  25. <p>Show remotes with URLs</p>
  26. <pre><code>git remote -v
  27. </code></pre>
  28. <p>Add a new remote</p>
  29. <pre><code>git remote add NAME URL
  30. </code></pre>