<linkrel="alternate"lang="fr"xml:lang="fr"title="Git pour les nuls"type="text/html"hreflang="fr"href="/Scratch/fr/blog/2009-11-12-Git-for-n00b/c-est-parti-pour-l-aventure/"/>
<linkrel="alternate"lang="en"xml:lang="en"title="Git for n00b"type="text/html"hreflang="en"href="/Scratch/en/blog/2009-11-12-Git-for-n00b/c-est-parti-pour-l-aventure/"/>
<divid="sousliens"><ul><li><ahref="/Scratch/en/blog/2009-11-12-Git-for-n00b/">introduction</a></li><li><ahref="/Scratch/en/blog/2009-11-12-Git-for-n00b/Git-pour-quoi-faire/">Git for what?</a></li><li><ahref="/Scratch/en/blog/2009-11-12-Git-for-n00b/conf-et-install/">Configure before Use</a></li><li><spanclass="active"title="You're here.">The Adventure Begins</span></li><li><ahref="/Scratch/en/blog/2009-11-12-Git-for-n00b/comprendre/">Understanding</a></li><li><ahref="/Scratch/en/blog/2009-11-12-Git-for-n00b/commandes-avancees/">Command List</a></li></ul></div>
<divclass="flush"></div>
<divid="afterheader">
<divclass="corps">
<h1class="first"id="here-we-go">Here we go!</h1>
<p>Here is one from many way to use <ahref="http://git-scm.org"title="Git">Git</a>. This method is sufficient to work on a project. Not there is many other <em>workflows</em>.</p>
<h2id="basic-usage">Basic usage</h2>
<p>Work with <ahref="http://git-scm.org"title="Git">Git</a> immediately:</p>
<ul>
<li>Get modification done by others <spanclass="black"><code>git pull</code></span>,</li>
<li>See details of these modifications <spanclass="black"><code>git log</code></span>,</li>
<li>Many times:
<ul>
<li><em>Make an atomic modification</em></li>
<li>Verify details of this modification: <spanclass="black"><code>git status</code></span> and <spanclass="black"><code>git diff</code></span>,</li>
<li>Add some file to be versionned if necessary:<br/><spanclass="black"><code>git add [file]</code></span>,</li>
<li>Save you modifications <br/><spanclass="black"><code>git commit -a -m "message"</code></span>,</li>
<li>Send your modifications to others: <spanclass="black"><code>git push</code></span> (redo a <code>git pull</code> if push return an error).</li>
</ul>
</li>
</ul>
<p>With these few commands you can use <ahref="http://git-scm.org"title="Git">Git</a>. Even if it is sufficient, you need to know one more thing before really begin ; How to manage <em>conflicts</em>.</p>
<p>Conflicts can arise when you change the same line of code on the same file from another branch you’re merging. It can seems a bit intimidating, but with <ahref="http://git-scm.org"title="Git">Git</a> this kind of thing is really simple to handle.</p>
Zoot <spanclass="Constant"><strong>the not so pure</strong></span>
</pre>
</div>
<p>and to commit</p>
<div>
<preclass="twilight">
git commit -a -m <spanclass="String"><spanclass="String">"</span>conflict resolved<spanclass="String">"</span></span>
</pre>
</div>
<p>Now you’re ready to use <ahref="http://git-scm.org"title="Git">Git</a>.
<ahref="http://git-scm.org"title="Git">Git</a> provide many other functionnalities. Now we’ll see some <ahref="http://git-scm.org"title="Git">Git</a> usages older CVS couldn’t handle.</p>