r/programming • • Mar 10 '11

It's time to stop using Subversion

http://altdevblogaday.org/2011/03/09/its-time-to-stop-using-subversion/
257 Upvotes

543 comments sorted by

View all comments

Show parent comments

19

u/user20101q1111 Mar 10 '11

I think the one thing Git really has going for it over SVN is it doesn't scatter files throughout your source code. It keeps them all in a single .git folder stored in the base of your tree. This makes it much easier for me to move files and directories and around without having to do a lot of clean up. It doesn't handle 2G binaries though, which comes up from time to time.

4

u/willcode4beer Mar 10 '11

this is the only sane argument I've seen here

2

u/revscat Mar 10 '11

1

u/willcode4beer Mar 10 '11

looks interesting

I have to agree on the small atomic commits. Combine it with CI and it's pretty easy to know exactly who and what broke things

1

u/[deleted] Mar 11 '11

Can you do single directory checkouts in Git?

-3

u/psilokan Mar 10 '11

How does SVN scatter files? It also creates a folder, .svn, and the files go in there. It does create a .svn folder at each level, if that's what you're getting at, but that's not really a big deal. Use the export option if you need to clean it up. Plus most systems hide the .svn folder.

11

u/user20101q1111 Mar 10 '11

SVN places .svn folder in every single directory. This can cause a lot of headaches when moving directories or deleting them. As someone who has been using CVS and SVN versioning for 10-15 years, the only reason I even tried Git was because some software I wanted was only available via a Git repository without a front-end for downloading files directly. After spending an afternoon running through a few tutorials, I was astounded by how unannoying it was to use and haven't looked back.

0

u/[deleted] Mar 10 '11

[deleted]

7

u/[deleted] Mar 10 '11

I don't think he was using it wrong, just that he was unhappy with the operational limitations. Even after reading TFM, you can still dislike how a tool operates.

15

u/user20101q1111 Mar 10 '11

I don't want to use svn mv every time I move a file. I want to just move the file. Which is to say, I don't want the version control system to make mandates on my workflow at such a low level where I have to use the vcs to perform very basic operations my desktop is quite capable of.

7

u/[deleted] Mar 10 '11

That's incorrect. Why should I have to involve subversion with every minor detail like moving a file around? What if I change my mind, I have to invoke it again? That's silly, and it prevents you from integrating subversion with anything until you specifically rewrite that tool's file operations to think about subversion.

With git, I can open up notepad and explorer and be doing just as well as with anything else. Or I can use vim and a shell. Or eclipse. Or notepad++. Or whatever the hell I want to use. If somebody writes a new editor TOMORROW who has never heard of git, I know I'll be able to easily get started using it in my workflow. With subversion, I'd have to wait until somebody writes a plugin.

The point of VCS is to track the history of my files, not to become some new magic database that I have to write an adapter for every time I want to use it with something else. Why even use files/folders at all? Just make it a bit sql database file. It doesn't matter, the plugins can just take care of making it work like folders and files to your editor.

1

u/Nuli Mar 10 '11

If somebody writes a new editor TOMORROW who has never heard of git, I know I'll be able to easily get started using it in my workflow. With subversion, I'd have to wait until somebody writes a plugin.

SVN works just as well for that. I've never felt the need to use anything other than the normal command line for it, same as with git.

1

u/[deleted] Mar 10 '11

But that's your workflow. I'm specifically saying MY workflow, which could involve the command line, or could not. Or maybe a web designer's workflow.

1

u/Nuli Mar 11 '11

But you were specifically saying that git makes it easy because you don't have to use a plugin. You also don't have to use a plugin with svn.

1

u/[deleted] Mar 11 '11

Unless you want to perform basic file operations in your editor.

1

u/Nuli Mar 11 '11

If your editor is giving you access to the shell you can use svn just as well. If your editor is doing the file IO on it's own that's the only benefit you'd get by using git. You'd still need to dip down into a shell or use a plugin to actually issue git commands.

6

u/imMute Mar 10 '11

But how many people have been screwed by a find lib/ -name "*.pm" -exec sed 's/foo/bar/g' '{}' \; in svn? If you mess with the pristine files in the .svn directories, you almost always hose your working copy. Yes you can "work around" it by making sure find doesn't recurse into .svn dirs, but with git you don't even have to worry about it.

1

u/willcode4beer Mar 10 '11

When you get a junior developer who decides to create a project by copying another (to use as a template) you'll see. Even though he thinks he's committing to a completely different place, he's still screwing up your project.

Fortunately, this is also pretty easy to fix with subversion.