maio
[h2N7SspZmY.git] / data / cache / e / e51435f7ddd01ccbae5bfb1c1a9268c9.xhtml
bloba20b5be6b762e81e3407357bca2ef548d9e306fe
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="http://repo.or.cz" class="urlextern" title="http://repo.or.cz" rel="nofollow">Repo Public Git Hosting</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-130] -->
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" [131-316] -->
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">$ sshkey-gen</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" [317-388] -->
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="kw3">cd</span> path<span class="sy0">/</span>to<span class="sy0">/</span>project
48 $ git init
49 $ git add .
50 $ git commit <span class="re5">-a</span> <span class="re5">-m</span><span class="st0">&quot;message&quot;</span>
51 $ git remote add origin <span class="kw2">ssh</span>:<span class="sy0">//</span>user_name<span class="sy0">@</span>repo.or.cz<span class="sy0">/</span>srv<span class="sy0">/</span>git<span class="sy0">/</span>project_name.git
52 $ git push <span class="re5">--all</span> origin</pre>
53 <div class="plugin_uparrow">
54 <a href="#" title="Back to top">
55 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
56 </a>
57 </div>
59 </div>
60 <!-- SECTION "How to create a project" [389-618] -->
61 <h2><a name="how_to_download_a_project" id="how_to_download_a_project">How to download a project</a></h2>
62 <div class="level2">
63 <pre class="code bash">$ git clone git:<span class="sy0">//</span>repo.or.cz<span class="sy0">/</span>project_name.git
64 $ <span class="kw3">cd</span> project_name</pre>
65 <div class="plugin_uparrow">
66 <a href="#" title="Back to top">
67 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
68 </a>
69 </div>
71 </div>
72 <!-- SECTION "How to download a project" [619-742] -->
73 <h2><a name="how_to_upload_a_project" id="how_to_upload_a_project">How to upload a project</a></h2>
74 <div class="level2">
76 <p>
78 Just the first time:
80 </p>
81 <pre class="code bash">$ git remote <span class="kw2">rm</span> origin
82 $ git remote add origin <span class="kw2">ssh</span>:<span class="sy0">//</span>user_name<span class="sy0">@</span>repo.or.cz<span class="sy0">/</span>srv<span class="sy0">/</span>git<span class="sy0">/</span>project_name.git</pre>
84 <p>
85 Always:
87 </p>
88 <pre class="code bash">$ git add .
89 $ git commit <span class="re5">-a</span> <span class="re5">-m</span><span class="st0">&quot;description of the modifications&quot;</span>
90 $ git push <span class="re5">--all</span> origin</pre>
91 <div class="plugin_uparrow">
92 <a href="#" title="Back to top">
93 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
94 </a>
95 </div>
97 </div>
98 <!-- SECTION "How to upload a project" [743-1038] -->
99 <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>
100 <div class="level2">
101 <pre class="code bash">$ git pull origin master</pre>
102 <div class="plugin_uparrow">
103 <a href="#" title="Back to top">
104 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
105 </a>
106 </div>
108 </div>
109 <!-- SECTION "How to update your version of a project" [1039-1139] -->
110 <h2><a name="how_to_create_a_tag" id="how_to_create_a_tag">How to create a tag</a></h2>
111 <div class="level2">
112 <pre class="code bash">$ git tag tag_name</pre>
113 <div class="plugin_uparrow">
114 <a href="#" title="Back to top">
115 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
116 </a>
117 </div>
119 </div>
120 <!-- SECTION "How to create a tag" [1140-1212] -->
121 <h2><a name="how_to_upload_a_tag" id="how_to_upload_a_tag">How to upload a tag</a></h2>
122 <div class="level2">
123 <pre class="code bash">$ git push origin tag_name</pre>
127 </p>
128 <pre class="code bash">$ git push <span class="re5">--tags</span> origin</pre>
129 <div class="tags"><span>
130 <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>
131 </span></div>
132 <div class="plugin_uparrow">
133 <a href="#" title="Back to top">
134 <img src="lib/plugins/uparrow/images/tango-small.png" alt="Back to top"/>
135 </a>
136 </div>
138 </div>
139 <!-- SECTION "How to upload a tag" [1213-] -->