Distributed Source Control
I had a short discussion with Steve Bohlen about distributed source control, and how it differs from centralized source control. After using Git for a while, I can tell you that there are several things that I am not really willing to give up.
- Fast commits
- Local history
- Easy merging
To be sure, a centralized SCM will have commits, history and merging. But something like Git takes it to a whole new level. Looking at how it changed my workflow is startling. There is no delay to committing, so I can commit every minute or so. I could do it with SVN, but it would take 30 seconds to a minute to execute, blocking my work, so I use bigger commits with SVN.
Having local history means that I can deal with a lot of small commits, because diffing a file from two commits ago is as fast as diffing the local copy. I tend to browse around in the history quite a lot, especially when I am doing stuff like code reviews, or trying to look at how I did something three weeks ago.
Merging is another thing that DVCS excels at. Not so much because of better merge algorithms (although that is a part of this), but simply because having all the information locally make the merge process so much faster.
All in all, it end up being a much easier process to work with. It takes time to get used to it, though.
And given those requirements, Fast commits, Local history, Easy merging, you pretty much end up with a distributed solution. Even with a DVCS, you still have the master repository, but just the fact that you have full local history frees you from having to manage all of that.
Comments
Other than fast commits, wouldn't something like SVN with the addition of sensible client side caching have much the same effect?
For me one of the biggest wins is getting rid of all those .svn folders scattered through my project causing no end of trouble when renaming or copying folders.
Barry,
.svn folders are annoying, yes.
And I like the way Git tracks renames much better, yes.
But what is client side caching? All the repository? If so, you are in DVCS.
If not, you are going to hit the cache limits and fall back to the same bad experience.
I did a lot of SVN Caching when I worked on SvnBridge, it is a tough problem.
And it doesn't help for fast commits
What about tooling? SVN has great tool-set main of them are AnhSVN and TurtoiseSVN.
I do not see mature tooling for Git on Windows.
Also I still think SVN is best suited for a small team (or even for single developer). Can you agree on this?
Dmitriy,
There are good tooling for Git. TortoiseGit gives you a very similar experience, for example.
And no, there is still the high cost of communication to the server, even for a lone developer.
I actually much prefer Git for use as a single developer. Creating a local repository on a local or network drive is incredibly simple, and if I want to distribute that repository to a remote server or another person it's also very easy. I even use Git for 1-hour throw away projects just for useful rollback and logging :)
I don't recall SVN being so simple, mainly because you need more tools - one set of tools for repo admin and another for repo usage.
Yes, I saw the TortoiseGIT. I also heard it has lots of issues, not sure about that though.
But still there is not anything like AnkhSVN/VisualSVN. I find them very useful working in Visual Studio. It saves a lot of time by keeping track of actions I do with files.
Additionally it seems a bit problematic to host GIT on Windows.
I just don't really get the right feeling about GIT and not sure how I can gain one...
You should check out Accurev when you do need a centralized system, it's really fast and lets you commit to your own "workspace".
Is that the sound of the "everything on the intertubes" pendulum creaking back in the other direction?
Ryan,
Oh, I still want everything up there, I am moving between machines so much that I need to maintain stuff out there, otherwise I am facing big sync issues
what's also cool about git.. If you have 2 remotes with differing source, you can checkout the clone of that remote as if it was the local copy.
Try it.. Go fork a project on github. clone your fork, and add the original as a remote ">git remote add ..." Then make a change to your local, and run "git checkout [remote-name]". You'll see the code without your change, and you can switch back to your local master to have your change back.
pretty cool if you ask me.
Oh wow, svn folder hell- can't count how many times I've had to piss around making svn happy.. other than that I've not had THAT many issues with it.
"But what is client side caching? All the repository? If so, you are in DVCS."
I guess that helps clarify exactly what a DVCS is for me then! I know git is so much more than that but I'm mostly a one man team so the collabortaion features are between me myself and I.
Instead of TortoiseGit I found Git Extensions a lot more useful and it integrates nice with Visual Studio. Git Extensions are not as pretty as ViualSVN but very simple and powerful, jut like Git.
The collaboration features are indeed between yourself and yourself.
And that's a huge feature.
Yourself today is not yourself yesterday.
Yourself when your hard drive is crashing is not yourself when you are writing code. And guess what all you need to do to verify your repository is to make sure it matches the hash you recorded at a particular release.
I respect Git a lot since it's a DVCS but I don't know if I've missed something here. Why Git over Bzr?
Bzr seems to be a lot more friendly on windows. I've seen no VS integration yet but TortoiseBzr does most of the things and it also has a more stable renaming capability than Git.
Yes, Git is faster than Bzr but IMHO userfriendlyness is more important.
Comment preview