scratch/content/html/en/blog/2009-11-12-Git-for-n00b.md

77 lines
2.3 KiB
Markdown
Raw Normal View History

2010-02-17 12:27:01 +00:00
-----
# Custom
isHidden: false
menupriority: 1
kind: article
created_at: 2009-11-12T11:39:54+02:00
2010-02-17 12:27:01 +00:00
title: Git for n00b
multiTitle:
en: Git for n00b
fr: Git pour les 'n00b'
multiDescription:
fr: Voici un tutoriel <a href="http://git-scm.org">Git</a> détaillé pour ceux qui en connaissent très peu sur les systèmes de versions. Vous comprendrez l'utilité de tels systèmes et surtout comment on se sert des systèmes de versions modernes, le tout en restant le plus pragmatique possible.
en: A detailed tutorial of <a href="http://git-scm.org">Git</a> for people knowing very few about versions systems. You'll understand utility of such program and how we use modern version control system. I try to stay as pragmatic as possible.
tags:
- git
-----
begindiv(intro)
A detailed tutorial of <a href="http://git-scm.org">Git</a> for people knowing very few about versions systems. You'll understand utility of such program and how we use modern version control system. I try to stay as pragmatic as possible.
enddiv
newcorps
# Begin with conclusion
Here is the list of sufficient and necessary command to use [Git][git]. There is very few. It is normal not to understand immediately but it is to gives you an idea. Even if this article is long, 95% of [Git][git] usage is in these 7 commands:
Get a project from the web:
2010-03-12 14:37:42 +00:00
<code class="zsh">
2010-02-17 12:27:01 +00:00
git clone ssh://server/path/to/project
2010-03-12 14:37:42 +00:00
</code>
2010-02-17 12:27:01 +00:00
Everyday [Git][git] usage:
2010-03-12 14:37:42 +00:00
<code class="zsh">
2010-02-17 12:27:01 +00:00
# get modifications from other
git pull
# read what was done
git log
# Make local changes to files
hack, hack, hack...
# list the modified files
git status
# show what I've done
git diff
# tell git to version a new file
git add new/file
# commit its own modifications
# to its local branch
git commit -a -m "Fix bug #321"
# send local modifications to other
git push
2010-03-12 14:37:42 +00:00
</code>
2010-02-17 12:27:01 +00:00
This article is written for people knowing very few about versionning systems. It is also written for those who had didn't followed progress since CVS or subversion (SVN). This is why, in a first time I'll explain quickly which are the goal of such systems. Secondly, I'll explain how to install and configure [Git][git]. Then, I give the command for each feature a <abbr title="Decentralized Concurent Versions System">DCVS</abbr> must have.
[git]: http://git-scm.org "Git"