I know 1000s of similar topics floating around. I read at lest 5 threads here in SO But why am I still not convinced about DVCS?
I have only following questions (note that I am selfishly worried only about Java projects)
Pitch me!
I have been where you are now, sceptical of the uses of distributed version control. I had read all the articles and knew the theoretical arguments, but I was not convinced.
Until, one day, I typed git init
and suddenly found myself inside a git repository.
I suggest you do the same -- simply try it. Begin with a small hobby project, just to get the hang of it. Then decide if it's worth using for something larger.
If your harddisk silently starts corrupting data, you damn well want to know about it. Git takes SHA1 hashes of everything you commit. You have 1 central repo with SVN and if its bits get silently modified by a faulty HDD controller you won't know about it till it's too late.
And since you have 1 central repo, you just blew your only lifeline.
With git, everyone has an identical repo, complete with change history, and its content can be fully trusted due to SHA1's of its complete image. So if you back up your 20 byte SHA1 of your HEAD you can be certain that when you clone from some untrusted mirror, you have the exact same repo you lost!
When you use a centralised repo, all the branches are there for the world to see. You can't make private branches. You have to make some branch that doesn't already collide with some other global name.
"
test123
-- damn, there's already atest123
. Lets trytest124
."
And everyone has to see all these branches with stupid names. You have to succumb to company policy that might go along the lines of "don't make branches unless you really need to", which prevents a lot of freedoms you get with git.
Same with committing. When you commit, you better be really sure your code works. Otherwise you break the build. No intermediate commits. 'Cause they all go to the central repo.
With git you have none of this nonsense. Branch and commit locally all you want. When you're ready to expose your changes to the rest of the world, you ask them to pull from you, or you push it to some "main" git repo.
Since your repo is local, all the VCS operations are fast and don't require round trips and transfer from the central server! git log
doesn't have to go over the network to find a change history. SVN does. Same with all other commands, since all the important stuff is stored in one location!
Watch Linus' talk for these and other benefits over SVN.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With