my KDExperiments

Programming, KDE and more

Why git rules! July 11, 2007

Filed under: git,kboard,kde,vcs — FeticcioFelino @ 2:34 pm

During past days, under suggestion of Paolo Capriotti, we’ve been using git for the development of our project KBoard, trying to understand how decentralized development model works and what are its strengths and weaknesses. If you don’t know what git is, why it is promotes a completely different development model than cvs/svn and why it is worth considering, i highly recommend you to give a look at this talk from Linus Torvalds himself, where he explains why he decided to write it and what he wants a vcs to be able to do.

One of the issues with cvs/svn is that, since everythig goes in a central repository, nobody is allowed to commit changes that do not compile or break completely the code. The result of this is that most developers instead of committing their changes in a regular an logical way will keep modified files in their machine waiting for that particular feature X to be ready to go mainline. A commit “Implemented huge feature X” means that something is not working properly, this should not happen where a revision control system does what it is supposed to do.

One way around this is creating a branch for each new feature, but you won’t create a new branch in the main repository for each new feature that you are going to implement, would you? Much better would be if you could have your own repository where you will create a new branch for each new feature, and from which the mantainer of the project will be able to get your changes as soon as you tell him “Feature X is ready“.

This works very well in real life because people tend to create trust networks. For instance the toplevel mantainer of a project (Linus for the kernel) only trusts a few people, he cannot trust everyone. Each one of his friend will also trust another bunch of people, and so on. That is, once you have a patch for a feature X, you will just have to notify the mantainer of upper level that such feature is ready in order to propagate it up to the toplevel.

Another very important side effect of this new model is that it is exactly in the spirit of Mark Shuttleworth‘s talk at the aKademy: a sort of rithm, regular schedules and releases are required for an opensource project to proceed. But most kde developers are just doing it for pleasure, it is not fair forcing them to spend two months just fixing bugs because the release date is approaching. But in a decentralized development model each developer can just say to the release manager “features X,Y are ready, feature W requires testing, don’t include feature Z because it is not ready“, and the release will just slip out without pain.

Advertisements
 

12 Responses to “Why git rules!”

  1. frank Says:

    Something you didn’t tackle was git vs the competition (bazaar, mercurial, ….). A lot of people compare the different SCM systems by features/functionality/speed, but i learned that issues with one system or another system are likely to be resolved (the distributed SCM’s are evolving quickly).

    I would place my bet on the SCM that has the biggest momentum behind it, as that one will probably pick up all the good stuff from other SCM’s. And it seems that git is that one now. So i believe that the disadvantages of git (like bad win32 support) are likely to be resolved in the near future.

    One could also argue that the choice is not too important, as long as you choose a distributed SCM, because most SCM’s have conversion tools that preserve history.

  2. Maurizio Says:

    You wrote a very insightful post, and i agree with what you say.

    I did not compare git to other distributes VCS’s simply because I still know little about git and nothing about bazaar, mercurial, etc.

    I was a bit unfair by not talking about other VCS’s, but I think that here the most important thing is getting used to the “distributed development model” idea, and those where just my 0.02€ in this direction.

  3. Fred Says:

    The thing that confuses me is I don’t see the advantage of distributed VCS over branches. I guess I’m missing something 🙂

  4. ervin Says:

    Everything you described is actually possible with subversion thanks to branches…

  5. Daniel Says:

    The problem with branches is the same problem that requires trust.

    All branches go in the same central place, and require centralized User/Pass management.

    With Git or Bzr, you can have infinite number uf people lifing under a repository that has 5-10 direct contributors.

  6. Daniel Says:

    The other huge thing about SVN was higlited by Aaron’s post about his trip to India. No direct access to the net means, no “saving the work” type of commits from internet-less contributors. Rather a painfull way to work.

  7. Diego Says:

    Git branches are just wonderful. SVN has got lot of attention because it was the one decent CVS replacement, but as linus said, SVN objective of writing a “cvs replacement that doesn’t suck” is not interesting, because there’s no way of doing CVS right.

  8. […] Why git rules! During past days, under suggestion of Paolo Capriotti, we’ve been using git for the development of our project […] […]

  9. Anders Says:

    Subversion might have some of these features in the future. Read this interesting thread:

    http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=128111

  10. s0nspark Says:

    The biggest advantage I have found while using a distributed SCM (I use bazaar) is that I do not need net access to work… I am able to commit, branch,, diff, revert using my local branch and then push my patches to a “master” branch when I am done and have connectivity.

    In fact I moved to this working model (first using darcs and then bazaar) when my net connection went down for a couple of days and it severely impacted my ability to get stuff done.

  11. […] this post here to see why Git is gaining so much […]


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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