This document compares the decentralized version control systems Git and Mercurial. It discusses their histories, how they work in a decentralized manner without needing a central server, branching and merging workflows, and integration with development environments and tools. Key advantages noted are performance, flexibility, and popularity for Git, while Mercurial provides good multi-platform support and integration. The conclusion is that distributed version control systems are now essential for open source and will become standard in companies in the near future.
1 of 76
More Related Content
Presentation DVCS - Git - Mercurial au LyonJug
1. Syst¨¨mes de gestion de version d¨¦centralis¨¦s
Git & Mercurial
S¨¦bastien Deleuze @sdeleuze
Lo?c Frering @loicfrering
17. HelloWorld.java
$ vim HelloWorld.java
$ cat HelloWorld.java
public class HelloWorld {
public static void main(String[] args) {
HelloWorld hello = new HelloWorld();
System.out.println(hello.sayHello());
}
public String sayHello() {
return "Hello World from Java!";
}
}
18. Track HelloWorld.java
$ git status -s $ hg status
?? HelloWorld.java ? HelloWorld.java
$ git add HelloWorld.java $ hg add HelloWorld.java
$ git status -s $ hg status
A- HelloWorld.java A HelloWorld.java
20. HelloWorld.php
$ vim HelloWorld.php
$ cat HelloWorld.php
<?php
class HelloWorld
{
public function sayHello()
{
return 'Hello World from PHP!';
}
}
$hello = new HelloWorld();
echo $hello->sayHello() . PHP_EOL;
27. Staging area
$ git status -s
M- HelloWorld.java
-M HelloWorld.php
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: HelloWorld.java
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working
directory)
#
# modified: HelloWorld.php
#
32. hello_world.rb
$ vim hello_world.rb
$ cat hello_world.rb
class HelloWorld
def sayHello(name)
"Hello " + name + " from Ruby!"
end
end
hello = HelloWorld.new
puts hello.sayHello("LyonJUG")
42. Console versus IHM
Constat :
- SVN = IHM d'abord, ligne de commande apr¨¨s
- Git/Mercurial = ligne de commande d'abord, IHM apr¨¨s
43. Int¨¦gration syst¨¨me Mercurial
? Excellent support multi-plateformes
? Support des proxy en entreprise
? Int¨¦gration Windows TortoiseHg
? hg serve tr¨¨s utile
44. Int¨¦gration syst¨¨me Git
? Int¨¦gration Windows
? msysGit / GitCheetah
? Cygwin
? TortoiseGit
? Support Windows un cran en dessous
? Support des proxy en entreprises
73. Synth¨¨se
? Performances
? Multi-platforme
? Branches
? Formation
? Support proxy
? Int¨¦gration IDE
? Souplesse
?Popularit¨¦
74. 2010 : les DVCS sont incontournables
dans le monde Open Source
2011 : les DVCS seront
incontournables en entreprise
75. Liens
Git Reference Hg Init
Pro Git Mercurial: The definitive guide
Git community book Bitbucket
GitHub
Analysis of Git and Mercurial
DVCS: A Not-So-Quick Guide Through
Why Git is better than X where X is one of hg, bzr, svn, perforce
Notre interview sur Git et Mercurial par Agn¨¨s Crepet des JDuchess
76. Cr¨¦dits
Scott Chacon : Why git is better than X
Scott Chacon : Git 101
Chris Wanstrath : Git: The Lean, Mean, Distributed Machine
Vincent Driessen : A successful Git branching model
Curtis Newton : Green light = Go / Flickr
Gource : Software version control visualization