Git git git

Maybe you know some SCM (revision control system) like CVS, Subversion or Perfoce.Cool, but you are already late.

Since many years now, new sort of system came up. They are called DCVS, and let’s called them « decentralized », or « distributed ». Famous systems are Git, but also Darcs, Mercurial, or Bazaar.

The main difference with « distributed » systems compare to « centralized » are we do not need a central repository. Anyone is able to create and manage it’s own repository, locally, or merge it’s branch with another one somewhere on internet, etc. 

To put it on a nutsheel, Git has been developped by Linus Torvald to manage linux kernel source code. It’s a powerfull system which can manage branch, diff, interface with svn, etc. There is lot of documentation, and I’ll  give some links to start with git, and few commands to manage a project locally.

The basic thing you may use : you are writing a project locally, and want to add a simple versionning system :

cd ~path/to/my/project
git init
git add .
git commit -m "Initial commit, or whatever message you want to say" -a

 And that’s it. When you want to commit your work, just do a git commit -m « message » -a

If you made a mistake, you may want to revert to the previous commit :

git revert HEAD

Yeah, you know enough to start with git. No more excuse if you make mistake on your project now.

Some references :

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *