backup de julho
[h2N7SspZmY.git] / data / cache / e / e71ae452b35c3870649909dc8a0780f4.xhtml
blobb420fa86d659e6177a9af2a0bb99d880ce0195f6
4 <h1><a name="git" id="git">Git</a></h1>
5 <div class="level1">
7 <p>
9 <a href="http://git-scm.com/" class="urlextern" title="http://git-scm.com/" rel="nofollow">Git</a>: <a href="http://en.wikipedia.org/wiki/Git_(software)" class="interwiki iw_wp" title="http://en.wikipedia.org/wiki/Git_(software)">Git</a> <br/>
11 Using <a href="https://github.com/" class="urlextern" title="https://github.com/" rel="nofollow">GitHub</a>
12 </p>
13 <div class="plugin_uparrow">
14 <a href="#" title="Back to top">
15 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
16 </a>
17 </div>
19 </div>
20 <!-- SECTION "Git" [1-115] -->
21 <h2><a name="how_to_install_git" id="how_to_install_git">How to install Git</a></h2>
22 <div class="level2">
23 <pre class="code bash">$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> git-core
24 $ git config <span class="re5">--global</span> user.name user_name
25 $ git config <span class="re5">--global</span> user.email you<span class="sy0">@</span>yourdomain.example.com</pre>
26 <div class="plugin_uparrow">
27 <a href="#" title="Back to top">
28 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
29 </a>
30 </div>
32 </div>
33 <!-- SECTION "How to install Git" [116-301] -->
34 <h2><a name="how_to_create_a_ssh_key" id="how_to_create_a_ssh_key">How to create a SSH key</a></h2>
35 <div class="level2">
36 <pre class="code bash">$ <span class="kw2">ssh-keygen</span></pre>
37 <div class="plugin_uparrow">
38 <a href="#" title="Back to top">
39 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
40 </a>
41 </div>
43 </div>
44 <!-- SECTION "How to create a SSH key" [302-373] -->
45 <h2><a name="how_to_create_a_project" id="how_to_create_a_project">How to create a project</a></h2>
46 <div class="level2">
47 <pre class="code bash">$ <span class="kw2">mkdir</span> project_name
48 $ <span class="kw3">cd</span> project_name
49 $ git init
50 $ <span class="kw2">touch</span> README
51 $ git add README
52 $ git commit <span class="re5">-m</span> <span class="st_h">'first commit'</span>
53 $ git remote add origin git<span class="sy0">@</span>github.com:user_name<span class="sy0">/</span>project_name.git
54 $ git push origin master</pre>
55 <div class="plugin_uparrow">
56 <a href="#" title="Back to top">
57 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
58 </a>
59 </div>
61 </div>
62 <!-- SECTION "How to create a project" [374-635] -->
63 <h2><a name="how_to_download_a_project" id="how_to_download_a_project">How to download a project</a></h2>
64 <div class="level2">
65 <pre class="code bash">$ git clone http:<span class="sy0">//</span>github.com<span class="sy0">/</span>user_name<span class="sy0">/</span>project_name.git
66 $ <span class="kw3">cd</span> project_name</pre>
67 <div class="plugin_uparrow">
68 <a href="#" title="Back to top">
69 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
70 </a>
71 </div>
73 </div>
74 <!-- SECTION "How to download a project" [636-770] -->
75 <h2><a name="how_to_upload_a_project" id="how_to_upload_a_project">How to upload a project</a></h2>
76 <div class="level2">
78 <p>
80 Just the first time:
81 </p>
82 <pre class="code bash">$ git remote <span class="kw2">rm</span> origin
83 $ git remote add origin git<span class="sy0">@</span>github.com:user_name<span class="sy0">/</span>project_name.git</pre>
85 <p>
86 Always:
88 </p>
89 <pre class="code bash">$ git add .
90 $ git commit <span class="re5">-a</span> <span class="re5">-m</span><span class="st0">&quot;description of the modifications&quot;</span>
91 $ git push <span class="re5">--all</span> origin</pre>
92 <div class="plugin_uparrow">
93 <a href="#" title="Back to top">
94 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
95 </a>
96 </div>
98 </div>
99 <!-- SECTION "How to upload a project" [771-1057] -->
100 <h2><a name="how_to_update_your_version_of_a_project" id="how_to_update_your_version_of_a_project">How to update your version of a project</a></h2>
101 <div class="level2">
102 <pre class="code bash">$ git pull origin master</pre>
103 <div class="plugin_uparrow">
104 <a href="#" title="Back to top">
105 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
106 </a>
107 </div>
109 </div>
110 <!-- SECTION "How to update your version of a project" [1058-1158] -->
111 <h2><a name="how_to_create_a_tag" id="how_to_create_a_tag">How to create a tag</a></h2>
112 <div class="level2">
113 <pre class="code bash">$ git tag tag_name</pre>
114 <div class="plugin_uparrow">
115 <a href="#" title="Back to top">
116 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
117 </a>
118 </div>
120 </div>
121 <!-- SECTION "How to create a tag" [1159-1231] -->
122 <h2><a name="how_to_upload_a_tag" id="how_to_upload_a_tag">How to upload a tag</a></h2>
123 <div class="level2">
124 <pre class="code bash">$ git push origin tag_name</pre>
128 </p>
129 <pre class="code bash">$ git push <span class="re5">--tags</span> origin</pre>
130 <div class="plugin_uparrow">
131 <a href="#" title="Back to top">
132 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
133 </a>
134 </div>
136 </div>
137 <!-- SECTION "How to upload a tag" [1232-1362] -->
138 <h2><a name="git_cheat_sheet" id="git_cheat_sheet">Git Cheat Sheet</a></h2>
139 <div class="level2">
143 <a href="http://cheat.errtheblog.com/s/git?utm_source=twitter&amp;utm_medium=micro-blog&amp;utm_campaign=twitter" class="urlextern" title="http://cheat.errtheblog.com/s/git?utm_source=twitter&amp;utm_medium=micro-blog&amp;utm_campaign=twitter" rel="nofollow">Cheat Git</a>
144 </p>
145 <div class="tags"><span>
146 <a href="/~kssilveira/site/doku.php?id=tag:programming&amp;do=showtag&amp;tag=tag%3Aprogramming" class="wikilink1" title="tag:programming" rel="tag">programming</a>
147 </span></div>
148 <div class="plugin_uparrow">
149 <a href="#" title="Back to top">
150 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
151 </a>
152 </div>
154 </div>
155 <!-- SECTION "Git Cheat Sheet" [1363-] -->