Linus Torvalds on Distributed Version Control with Git
February 23rd, 2008A friend directed me to the YouTube video posted in May of 2007 in which Linus Torvalds talks about git and the general advantages of distributed version control systems (DVCS’s) over centralized version contol systems (CVCS’s).
Here are some of the key points, liberally paraphrased by me.
- Advantages of DVCS:
- While working offline, developers can still commit their changes. This is a big win when you have a large community of developers who are only loosely coupled, i.e. they don’t all have commit access to a central repository.
- Branches occur as everyday events. Merging is not the cumbersome and specialized task we have come to think of under CVS.
- Everyone has commit access. Eliminates distinction between trusted insiders with commit access vs untrusted outsiders without it. Then when you complete work on your branch, you offer it back to the community where it may be accepted or rejected. Linus says this point alone is reason enough for every open source project to use a distributed model of VC.
- Release handling is facilitated: any release team has their own branch, selected by merging selected branches from #3. [And multiple release teams with differing goals and timetables are possible, without getting in one anothers' way.]
- Centralized code base is a deterrent to commits. Many shops have a strict policy - don’t commit [or merge to major branch] until you are sure everything works, run a huge test suite, etc. If you don’t branch very often, you end up with huge branches and a large merge liability. If you do branch often, you put a lot of resources into testing and re-testing. It’s expensive either way.
- With DVCS, smaller groups can pull from one another and get a start on integration and testing across teams. This allows heirarchical development and reduces need for software priesthood at the top gating all changes into production code.
- Lots and lots of branches can happen without cluttering a central repository.
- DVCS is the model the Linux kernel uses. And it works. It helps that networking team can share branches with NFS and vice versa.
- When merging for a release, you don’t try to cover all available branches. You pull from your network of trusted developers, maybe 5-15 individuals. “At some point trust means you have to accept other people’s decisions.”
- Git is much easier to use than CVS, once you get over the hump of what distribution is about.
- Merging is much easier with git than with CVS. The Linux kernel is over 22,000 files. They have been using git for 2 years, with an average of 4.5 merges per day.
- When a merge conflict between two branches occurs, instead of pulling out his hair, Linus accepts one branch, then kicks task of resolution back to author of code in the other conflicting branch. That way Linus does not need expertise in every aspect of the kernel. Second developer does the hard work, instead of Linus.
- DVCS is clear winner if you have teams collaborating at different sites, unless you have a very fast and reliable network.
- Diff against repository and commit is orders of magnitude faster in DVCS than CVCS, even if you have a good network, and many projects do not have a good network.
- In CVCS, one deterrent to branching is the global namespace for all branches. What do you call your test branch - “test”? Oops, there are already branches test1 [or test0001] through test2000. So you invent bureaucratic branch naming conventions.
- Merging several times a day with minimal headache (often done in less than a second w/22,000 files) keeps away the big dreaded consolidated merge task.
- CVCS merges (CVS and SVN) lose history, making repeated merges difficult.
- DVCS eliminates single point of failure, uses natural replication of data.
- Git uses SHA1 - this is to check consistency at project level, not really a security feature. If you keep 20-byte hash, you can download a copy of an entire repository from a completely untrusted source and be confident in integrity of the content. Google Code, which is based on SVN, does not offer this degree of assurance.
- Graphic display of branch/merge history, done quickly (gitk), is an important feature of git, especially for release teams. When there is a bug, merge guys don’t care about a single file, they care about subsystems. What happened in the SCSI subsystem in the 15,000 commits since last week? This command can cut that down to 50 commits.
- Git is 100,000 lines of C. Some of it is complex because performance is a goal, for example optimizing handling of an entire tree vs. simple one-file-at-a-time traversal.
- CVS annotate is faster than git’s annotate at file level, but git can track file changes e.g. when a function moves from one file to another.
- Observations on DVCS:
- As soon as you commit code offline, you are creating a branch.
- If you have an active development community, backups of a central repository are far less of an issue. If you lose your local copy, pull the corresponding branch from someone else. This is what Linus does.
- In centralized version control systems, there is a notion of commit access. You have gurus with commit access and morons whose code can’t be trusted. This leads to political struggles within the project and saps creative energy from both gurus.
- In a centralized repository, branches are global.
- Development typically proceeds with hundreds or thousands of branches, but only a few are seen by the outside world, or indeed by the majority of insiders.
- Merging and releases are based on a network of trust. Linus points out, if you have ever done security work, you realize it boils down at some point to a network of trust. The same is true of release management in a distributed environment. Trust networks fan out so it allows multiple tiers of effort.
- Linus encourages multiple releases of the kernel going on, says his branch probably gets more weight than it should.
- Git and Mercurial (hg) are the two DVCS’s Linus recommends, with preference for git.
- Some companies that are not using DVCS officially may have developer teams that check out from SVN or CVS and work within git until they are ready to merge back into the central repository.
- Distribution means nobody is special.
- Centralized systems have been used successfully in tightly controlled corporate environments for decades.
- You do not track a single file in git. You track all content of the project. (Atomic commits, etc.)
- KDE kept everything in a single CVS repository, 8 GB. SVN blew that up by a factor of 3. Git might compress that down to 1.3 GB. But in this scenario, initial cloning of the tree with git is expensive. It’s much better to put separate components into separate repositories.
- Git uses a content addressable storage system, which saves considerable space when many copies of the same content are involved.
- User “super project” to coordinate different components and deal with shared build structure.
- There is a significant difference between something taking 30 seconds vs. taking half a second. When a task takes less time, people will use the tools differently.
- Branching is not the issue. CVCS’s can create branches very quickly. Merging is the issue.
- Git tracks content, not files. History is on project basis, not file basis.
Other commentary on this talk: Linus Torvalds on GIT and SCM
Slides and text of a talk (pdf): git - A Stupid Content Tracker ~ Junio HamanoWet And Wild Nymphos CD-1
childhood masturbation
pee and blow
hardcore couples outdoors
free gay oral
big boobs handjob
sexy latinos
lesbian sex slaves
women have sex with dog
guy on girl sexcam
virgins teens
fox hustler flex fit hat
xxx bdsm
ass porn
cigarette smell removal
big dicks little chicks
gay demon
american bad ass
cute black girl getting fucked
adult halloween party ideas
shaved asian teen
gay male videos
hardcore stocking
korean underground teens free nude pictures
rachel weisz paparazzi
hot petite lick
milf big boobs
bi gay
midget men fuck women porn
usenet petite model
cum fuck me boots
milf blowjobs
interest rate swaps accounting
deep enough to dream mp3
lolita toy
my first sex teacher full vid
british milf
personal accident insurance broker
lg flatron
fisting dildo
keira knightley porn
big tits bikini
boy cam
college girl party
korean chicks nude
POVerted-6 CD-2
petite bald pussy
amd assembly compare and swap code
mariah carey boobs
shemale fuck
rubber mouth gags
how to fuck a girl
linda hogan upskirt
hentai gothic
archos 504 personal media player
facial rejuvenation ct
dangerous side effects celebrex
midget cum anal
forced gay blowjobs
youn girl and big stud
penis implants
creampie housewives
reality hardcore parties
japanese secretary orgasm
drunk dorm sex
massage miami school student
young latinas nude
teenage girls in bikinis
ca military relief fund
giving girls orgasms
stripping party
petite female nude models
love making techniques
abduction and rape stories
full figured breasts
throat infection
squirt mouth
penis close up
nude gay beach
tiny titty
paparazzi celebrity
learn how to deep throat
young cunt gallery
mily anal beastiality
adult diaper sites
hard money loan personal unsecured california ca
milfriders.com password
hand foot and mouth disease
nude beach erection
medical sex bondage
Tesao Na Adolescencia CD-2
nude athletes
swimsuit models cheerleaders
free galleries pregnant nude women
sluts sucking cocks
Blow It Out Your Ass CD-2
giant women swallow guys whole
adult voyeur
sexy gangbang
baby bottle fetish
redheads nude
my wifes clit
dump the pussy
young nudes
twinks pics
rape me nirvana
kinky pvc stocking sex vids
girl give me head
hardcore throat fucking
amateur chunky chubby fingering older
classroom teacher tits
girls using a dildo
booty barker nextel cup crew chief
latino marketing plastic surgery
hott blondes
Dont Stop Im Going To Squirt CD-1
old sluts in stockings
teenage girls naked
fucked hard brunette
free erotic videos
panty hose teacher
fuck me daddy
age pee mp3
vagina games
girls in bikini pics
hot squirting orgasms
femdom free stories
literotica stories
shemale best sex
facial video preview
vintage rodox hairy pussy thumbnails
men ass holes
biggest cum shot
drunk vip girls
animated bdsm gifs
free gay male sex pictures
free sample of penis enlargement
double cock suck
silvia saint hardcore gallery
male animal sex
femdom stories
ass eating
jades nude celebrity archive
zoo sex free
free teacher pussy licking vids
hidden up skirt pics
naked and pregnant in public
free foot fetish chat rooms
massive female bukkake
coats choice horse stud australia
young girl peeing
Volgari Punizioni Anali CD-2
korean girl girl
horny chicks
free wives gallery
fff licking orgy
hot brunette squirting
sexcam jasmin
free paris hilton porno
wife in thong