A couple of weeks ago I started playing with Git. First of all, I love the notion of distributed version control, although it took me a while to wrap my head around it.
Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.
I found it quite hard to explain Git or distributed version control in general. The best explanation I heard so far comes from Joel Spolsky, who talked about it on the stackoverflow podcast. It goes something like this:
You are working on a local clone of the full repository and a commit is basically a set of changes applied to a version of that repository.
I have a little side-project with 2 other developers and we decided to use Git as our version control system. One of the reasons why we choose Git, was the limitations we saw in our daily work with SVN and the more important reason - isn't it just cool to try something new?
One way to let others participate in your development, is to have a repository on GitHub. Others can come in and get a local copy of your work, contribute to it and merge it back into your original source tree later on. Everything is accessible and essentially open source. However, if you pay GitHub some money, you can have private repositories with contributors - that's what we did.
The move from SVN to Git wasn't easy. We had to adopt our style of working with version control, because we ran into trouble pretty early. I guess we first needed to grok the mindset of branching and merging, before we could really leverage the advantages of distributed version control.
Unfortunately GitHub didn't help getting started. I don't know if it's because of broken tools or if it was GitHub's fault, but we managed to damage one of our branches. When I tried to pull from the branch I got the following error message:
crusty:doublemill dlinsin$ git pull origin master
error: Could not read 9b82bba67693db3b47189aefea07ec4e1d7be38e
fatal: bad tree object 9b82bba67693db3b47189aefea07ec4e1d7be38e
remote: Counting objects: 13, done. remote: Compressing objects: 100% (8/8), done.
error: waitpid (async) failed
fatal: git-upload-pack: aborting due to possible repository corruption on the remote side.
remote: Total 8 (delta 0), reused 0 (delta 0)
remote: aborting due to possible repository corruption on the remote side.
Unpacking objects: 100% (8/8), done.
error: waitpid (async) failed fatal: error in sideband demultiplexer
Since I couldn't find clear information on the problem, I decided to open an issue with GitHub support. Unfortunately after almost a week, I got a reply to my issue which was more than disappointing:
The best thing to do would be to delete the repository and recreate it with a fresh git push.
I mean seriously? Is that the best they can do? Sure, it's the easiest way out for GitHub, but not the most customer friendliest way I can imagine. It's just so disappointing, because I like GitHub and I have no problem to pay for their service. In fact, I guess I would have paid them anyways, because they have a great product and deserve some support. I just don't like this kind of "Have you tried turning it off and on again?" - attitude.
However, even after all the trouble we had, I'm still glad we choose Git. I think distributed source control is the future and I would suggest anybody to have a look at it, before starting the next project with SVN.