News for hackers. Stuff that matters.
Re:Why You Should Switch from Subversion to Git by FooBarWidget on Wednesday September 16, 2009 @11:46AM (#826032)
I didn't experience pain either... until I used git for a while. Then I realized all the pain that I was suffering but wasn't aware of.

> The amount of time people spend blogging about how great git is could be surely put to better use.

Maybe they're spending so much time blogging because git really is that good?

Re:Why You Should Switch from Subversion to Git by ebishop on Wednesday September 16, 2009 @01:23PM (#826319)
While I can understand how git is better for the majority of use-cases, I found that it was far less suitable than SVN for what I want to do. I used git for a while (3-6 months) and then switched BACK to using SVN. It's true I didn't experience pain until I started using git. That's when the pain started.

First, as I said, my use case is highly non-standard. I'm the only developer on my project, so I don't have to worry about collaborators. I do my work on a lot of different computers, so it turns out that (for me) one of the biggest advantages provided by version control is effectively synchronizing source code between systems, many of which get erased (e.g. new OS installed ) on a regular basis, all of which have internet access. It is important that I be able to quickly and simply set up a development environment on a new system -- a somewhat unusual requirement, I realize. Under these circumstances the primary advantage -- not just of git, but any DVCS -- becomes a major disadvantage. The whole point of DVCS is that the ability to commit is separated from the ability to update the central repository (git push), where they are the same in centralized VCS. However... I ALWAYS want to push when I commit. If I commit to a local repository on a machine that gets wiped, it does me no good. It needs to get updated in the central, online repository every time. This can be done with a short simple shell script, of course, but remember: I need it it to be as simple as possible to set up a new development environment. This adds an extra step, and if I neglect it, I can lose a lot of work. If I use SVN, I simply don't have to worry about it. It's automatic.

Another feature of SVN that I like, that's impossible with DVCS: revision numbers. With SVN, revision numbers increase sequentially from 1 to whatever number commit the last one was. DVCS can't do revision numbers because you can't determine the sequence of commits until after the commits are made (everyone has their own repository!). Being able to refer to r378 is a LOT nicer than referring to an arbitrary hexadecimal identifier. Having commit identifiers that convey information is a huge plus.

For me, these reasons are enough to outweigh the advantages of having access to repository history while offline and the better handling of branching that git offers.

Re:Why You Should Switch from Subversion to Git by joeyh on Wednesday September 16, 2009 @02:29PM (#826479)
If adding a shell script to your development environment results in pain every time you need to set it up, that says you haven't automated setting up the environment. One great way to automate it is to put all such scripts (surely this would not be the only one?) and other files in a version controlled repository; then you just have one more thing to check out.

(If checking out one more thing results in pain, you should think about automating the checkout too... This line of thinking has resulted in me keeping everything in git and using a single `mr` command (google will find it) to check out all my respositories when I'm setting up a new account.)

Revision numbers are not impossible with DVCS; bzr has repo-local revision numbers. But once a number becomes longer than 3 digits, I cut and paste it anyway; if I'm already pasting, the longer size of git's sha1s doesn't matter.

Re:Why You Should Switch from Subversion to Git by steveklabnik on Wednesday September 16, 2009 @05:32PM (#826882)
Also, you only need as much of the hash as neccesary to identify the commit. Generally 5 or 6 digits is long enough.
Re:Why You Should Switch from Subversion to Git by axod on Wednesday September 16, 2009 @11:50AM (#826045)
How can you not be aware of pain? If I was wasting time on a laborious task, I think I'd know about it and think of a better way. Care to share an example from your experience?

During my average day, I probably spend a few minutes total messing with svn. For my usecase, it's already optimum. The only way I could reduce that time is to not put in any commit messages :/

Re:Why You Should Switch from Subversion to Git by timwiseman on Wednesday September 16, 2009 @12:10PM (#826093)
How can you not be aware of pain?

Anecdotally, this is fairly common. I have known people that did not realize they had fairly bad back pain until they went to the doctor for something else and had it treated.

Sometimes, it is only in absence of something that we really notice it, especially if it is truly chronic. I suspect most people have gone somewhere with a fairly loud background noise. At first they may notice it, but after being there for a while they may forget about it and may even forget it was ever there. But they will notice and realize how annoying it was if that noise ever stops.

Re:Why You Should Switch from Subversion to Git by axod on Wednesday September 16, 2009 @12:33PM (#826166)
I don't think the analogy holds here though.

I type 'svn commit' 'svn update', it works. quickly.

For me, it's like suggesting I change from using 'cd' to change directory, to using 'awesome-cd' to change directory :/

Re:Why You Should Switch from Subversion to Git by timwiseman on Wednesday September 16, 2009 @01:14PM (#826283)
I have never used SVN or Git (I use Hg at home and VSS at work), so I can't say there.

What I can say is that I didn't realize how painful Java was for me until I started learning Python. That may be a closer analogy, though still not perfect.

Re:Why You Should Switch from Subversion to Git by pmichaud on Wednesday September 16, 2009 @01:16PM (#826292)
Why would I switch from horses to these new-fangled automatic carriages? Horses get me where I need to go.
Re:Why You Should Switch from Subversion to Git by warp on Wednesday September 16, 2009 @02:43PM (#826516)
Here is an example from my experience:

Sometimes when I'm developing, and ready to commit something I notice I've made a few unrelated changes/bugfixes. I could just commit the whole thing at once, but that makes merging a hassle because I probably want to merge those bugfixes to trunk much sooner than any code which implements a new feature. So, I would need some way to commit only certain diff chunks from each file.

I understand from "http://www.gitcasts.com/posts/interactive-adding that git can do that. So far it hasn't been incentive enough to switch, but it's one example of the pain of subversion.

Re:Why You Should Switch from Subversion to Git by FooBarWidget on Wednesday September 16, 2009 @08:36PM (#827171)
Try 'git add -p', it's a lot easier than interactive mode.
Re:Why You Should Switch from Subversion to Git by FooBarWidget on Wednesday September 16, 2009 @08:32PM (#827160)
I don't know how, I just realized it after the fact. One good example is the use of branches. I began with CVS and switched to Subversion later. I always avoided branches because keeping track of merging points and resolving conflicts is a pain. I used to think that branches cause more problems than they solve.

Until I switched to git. Only then did I realize how much pain I was suffering by avoiding branches. Now I use branching all the time.

I guess it's because I had nothing to compare to. I didn't know that branches can be done well.

Re:Why You Should Switch from Subversion to Git by steveklabnik on Wednesday September 16, 2009 @01:42PM (#826365)
When your server's drive crashes, and you lose all of your history... you'll feel some pain. Backups help, but not as good as git does.

See what happened with _why? He nuked everything, but none of it really went away. With CVCS, the community would have lost everything.

Re:Why You Should Switch from Subversion to Git by durin42 on Wednesday September 16, 2009 @12:20PM (#826123)
> Maybe they're spending so much time blogging because git really is that good?

That may be, but they're the only community I see being extremely in-your-face about their tool and how it's clearly beating the pants off everything else. Personally, I'd be more interested why they feel the need to declare its goodness so loudly, when if it really is as awesome as these articles make it sound then it'll spread like wildfire by word of mouth.

emacs changed the way I write code, and made me wildly efficient compared to before I used it. That doesn't mean I'm going to go and start browbeating people into using it. The git community seems to be blind to the notion that git (as wonderful as it is) might not be for everyone.

Re:Why You Should Switch from Subversion to Git by snprbob86 on Wednesday September 16, 2009 @12:48PM (#826218)
All these people shouting about it are are spreading it by word of mouth and it has spread like wildfire. Maybe it is time to consider if it really is that good?
Re:Why You Should Switch from Subversion to Git by FooBarWidget on Wednesday September 16, 2009 @08:38PM (#827174)
How is an article on someone elses website "in-your-face"? Nobody's pointing a gun at you and forcing you to read it. If blogging about it is "in-your-face" then what do you consider an acceptable method to tell others about a great tool?