Git, some notes and a little tutorial

libre software, mswl, mswl-cases, mswl-devtools

Hi at all!!!!

These days I write a serie of post related my subject in Case Studies, in this subject the teachers show us a series of talks about free software applications, tools, how-to’s, and every that they think interesting for us.

Today i’m going to write about Git.

Git is a distributed control version system initially developed by Linus Torvalds for use in the Kernel development.

Git is lincensed under GNU GPLv2.

Each distributed working copy is in self a complete repository with all data, full history, and full revision tracking capablilities, and for work not depend (once you have your working copy) on network or a central server.

The Git developr began when many developers of Linux kernel chose to give up acces to the propietary BitKeeper system.
BitKeeper use was free of charge, until his copyright owner Larry McVoy left the ability of this.
Then, Linus Torvalds began to search other distributed control version system, but none of the available met his needs, particulary his performance needs, so in a email wrote in April 2005, he announced that he began to write his own distributed control version system.

Git was inspired in BitKeeper and Monotone (is a free software control version tool).

Some Git’s feautures are:

– Strong support for non-linear development.
– Distributed development.
– Compatibility with existing systems/protocols.
– Efficient handling of large projects.
– Chryptographic autenthication of history.
– Toolkit-based design.
– Pluggable merge strategies.
– Garbage accumulates unless colected.
– Periodic explicit object packing.
– Snpashots directory trees of files.

Git is present in several and importants forges like:
GNU Savannah

And Git is used by importants project how their control system, like:
Gnome, etc.

Git works following the next example:

1- First of all you must download and install Git, in your machine.
I’m going to explain for Debian/Ubuntu GNU/Linux.
You must write in your console:

>sudo apt-get install git-core

2- Once you have Git installed in your computer, you must to obtain your work and complete copy, called clone, of your preffered Git contolled project.
You must do a clone, for do this you must do this in your console (note that for the example i use my mswl classes notes clone in gitorious, you must replace the git url for your project one):

>git clone git://

Now, you have your clone in your computer.

Other way for get the same, but a bit more difficult is:

>mkdir yourclone (make your directory for your git project)
>git init (initialize your git directory project)
>git pull git://

with pull you get all updates in the main project Git place, if you don’t previously nothing, you’ll get all project, that is to say, this would be like clone instruction when you don’t get anyting.

2- When you have your working copy, you can work with this, make changes add new files or delete others.

3- When you add new files to your working copy, you must add to the git project:

>git add fileName

4- If you want to see what changes have been commited, you can write:

>git status

and you can see the files for been commited.

5- When you have made changes, adding files or delete ones, you must commit the changes for the Git project:

>git commit -a

Now will appear a text message for put your message with the changes that you have done, or other message that you want.
When you validate the message, then your commit will be done.

6- Now, if you would want to update your changes to the master branch you must do the next:

>git push

Then your commit changes will be upload to the master branch, and will be available for the others developers.

Note that if possible that your Git host can ask to you for the master branch git url.

7- If you want to see all project logs you can write:

>git log

and then you see all information of the commits, and the files done by you and the others developers.

8- If you want to update your project with the master branch changes you must use the previous showed instruction pull:

> git pull

and exists other way for update that is:

> git merge origin/master

the origin will be the project master branch and origin your clone.


Git in the Wikipedia
Git tutorial (in spanish)
Git M.Sc. Libre Software slides
Git homepage
Git tutorial

And that is all, see you!!!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s