Git for n00b

introduction

A detailed tutorial of Git 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.

Begin with conclusion

Here is the list of sufficient and necessary command to use 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 usage is in these 7 commands:

Get a project from the web:

git clone ssh://server/path/to/project

Everyday Git usage:

# 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

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. Then, I give the command for each feature a DCVS must have.

comments

Follow me
Copyright ©, Yann Esposito
Created: 11/12/2009 Modified: 05/09/2010
Entirely done with Vim and nanoc