In my view, svn has a number of benefits over git. Let me offer a quick runthrough of why I prefer svn for small projects.
The main reason to use svn in my view is simplicity. git can’t do many things svn does with as little friction as svn requires.
Centralized version control is definitely simpler than distributed. Distributed can be useful if you want to develop a feature offline (and find the svn ways of doing that to be a pain, as I do), want to work on something independently for a while, want to work on an experimental branch, etc.. But there’s a good reason to prefer centralized in some cases. Distributed version control is too confusing for many people you might want to collaborate with. My research group has enough trouble getting my PhD advisor to use svn. Do you think this will be easier with git?
The documentation for git is pretty bad. In contrast to svn, I can’t rely on the documentation for git making sense and basically have to Google for many things, even some things which are straightforward in svn (like svn keywords). The Pro Git website is pretty good, however.
One thing I like is having a incrementing number that refers to a unique version. You actually can get that in git, but it’s a complicated command that I’ve never seen used in real life. This is just how svn works.
Let’s say you are using git just want to print the hash and date of last modification in your code or document. svn has a keyword functionality to do this automatically when you update. git makes this at least moderately complicated (for silly reasons). There are several ways to do this, but editing the file directly with a script is unsatisfactory because the file will show up modified, unless there’s some git way around this. In svn the files show up as unmodified. You also could pass in the hash at compile time, which is just extra work over svn.
I have heard conflicting things about partial checkouts in git. My impression is that they work but are more complicated than svn. Partial checkouts are totally normal and easy in svn. I do them fairly regularly, as well.
GUIs for git were still underdeveloped last I checked, or at least the free ones were. GUIs make a number of things much easier. At one point I started converting my repositories over to git because I wanted to work offline more often, but the lack of good GUIs made me stick with svn. (I have some other restrictions here that made some GUIs not attractive, and maybe I should look into this again.)
Here are the advantages I see to git/github: pull requests being code reviews and the distributed nature of the software. The former is great, as problems are caught early. The latter is not always an advantage, as I explained earlier, but generally is a major advantage in large projects.
To be honest, I could see myself changing my mind over this in the future, but for now I see no reason to switch from svn to git for most of the repositories I have.
The big thing (for some people) that you are missing with git is that it makes working with branches really easy. In my first job we used SVN and maintaining separate branches was a pain in the ass, to the point where we only did it for a release branch, while with git it’s pretty trivial to the point where people use them all the time even when working locally only.
I do agree that git’s documentation and UX for basic operations is not as nice as SVN.
edit: Also agree about the signalling part to some extent. I do feel like there’s a tendency among some programmers to gravitate toward the most complex plausible technology in order to show how smart they are.
If you really need to branch then svn is the wrong tool to use, because branching makes a lot more sense for distributed systems. For the repositories I use svn for, I never once have had to branch in any complicated way. If I needed to branch in a significant way, I’d use git or hg. The most I’ve done is “branching” a file by duplicating it, and then later merging in the changes with a graphical diff tool. At this level, git is no easier or harder than svn, though you might consider this approach to be sloppier than git’s approach.
Talking to some git people gives me the impression that they branch way more often than is necessary, though. Maybe if you have a hammer, everything looks like a nail.
Maybe if you have a hammer, everything looks like a nail.
Those grapes are probably sour anyway.
edit: To make a less snarky contribution, there’s always a difficult balance between “those people are doing something that seems weird to me, I should probably just ignore them and go my own way” vs “if smart people are doing something that seems weird, it’s probably for a good reason, maybe I should learn it”.
If you’re suggesting that I say I don’t think branching is useful because I can’t do it well in svn, or something like that, then I can’t say much other than that you’re mistaken. If you’re not suggesting this, please clarify.
Yes, I have learned about branching workflows. I decided that they don’t make sense for most of my repositories. For example, the repository I commit most often to is primarily a collection of text outlines on a variety of subjects. How would a branching workflow help me here? It wouldn’t. In the 3 years I’ve been using this repository, branching never seemed like a good idea. Branching just seems like extra friction in the process. My impression is that many git people probably would branch in this case, and I don’t understand what benefits they get from that. If you’re aware of any, I’m listening.
The larger project my PhD is a part of uses git with a pretty standard git workflow, which I agree makes sense for the project. My claims are that large software projects have different requirements than small software/documentation projects, and that you might find different tools to be useful in each case.
Edit: If you thought the hammer sentence was snark, sorry for that. It was my attempt to explain why some people who use git might branch more often than is needed.
If you don’t need git’s features it’s fine not to use it. I just brought up branching because you left it out of your comparison, but IIRC it’s the main reason git was even created.
In my view, svn has a number of benefits over git. Let me offer a quick runthrough of why I prefer svn for small projects.
The main reason to use svn in my view is simplicity. git can’t do many things svn does with as little friction as svn requires.
Centralized version control is definitely simpler than distributed. Distributed can be useful if you want to develop a feature offline (and find the svn ways of doing that to be a pain, as I do), want to work on something independently for a while, want to work on an experimental branch, etc.. But there’s a good reason to prefer centralized in some cases. Distributed version control is too confusing for many people you might want to collaborate with. My research group has enough trouble getting my PhD advisor to use svn. Do you think this will be easier with git?
The documentation for git is pretty bad. In contrast to svn, I can’t rely on the documentation for git making sense and basically have to Google for many things, even some things which are straightforward in svn (like svn keywords). The Pro Git website is pretty good, however.
One thing I like is having a incrementing number that refers to a unique version. You actually can get that in git, but it’s a complicated command that I’ve never seen used in real life. This is just how svn works.
Let’s say you are using git just want to print the hash and date of last modification in your code or document. svn has a keyword functionality to do this automatically when you update. git makes this at least moderately complicated (for silly reasons). There are several ways to do this, but editing the file directly with a script is unsatisfactory because the file will show up modified, unless there’s some git way around this. In svn the files show up as unmodified. You also could pass in the hash at compile time, which is just extra work over svn.
I have heard conflicting things about partial checkouts in git. My impression is that they work but are more complicated than svn. Partial checkouts are totally normal and easy in svn. I do them fairly regularly, as well.
GUIs for git were still underdeveloped last I checked, or at least the free ones were. GUIs make a number of things much easier. At one point I started converting my repositories over to git because I wanted to work offline more often, but the lack of good GUIs made me stick with svn. (I have some other restrictions here that made some GUIs not attractive, and maybe I should look into this again.)
Here are the advantages I see to git/github: pull requests being code reviews and the distributed nature of the software. The former is great, as problems are caught early. The latter is not always an advantage, as I explained earlier, but generally is a major advantage in large projects.
To be honest, I could see myself changing my mind over this in the future, but for now I see no reason to switch from svn to git for most of the repositories I have.
The big thing (for some people) that you are missing with git is that it makes working with branches really easy. In my first job we used SVN and maintaining separate branches was a pain in the ass, to the point where we only did it for a release branch, while with git it’s pretty trivial to the point where people use them all the time even when working locally only.
I do agree that git’s documentation and UX for basic operations is not as nice as SVN.
edit: Also agree about the signalling part to some extent. I do feel like there’s a tendency among some programmers to gravitate toward the most complex plausible technology in order to show how smart they are.
If you really need to branch then svn is the wrong tool to use, because branching makes a lot more sense for distributed systems. For the repositories I use svn for, I never once have had to branch in any complicated way. If I needed to branch in a significant way, I’d use git or hg. The most I’ve done is “branching” a file by duplicating it, and then later merging in the changes with a graphical diff tool. At this level, git is no easier or harder than svn, though you might consider this approach to be sloppier than git’s approach.
Talking to some git people gives me the impression that they branch way more often than is necessary, though. Maybe if you have a hammer, everything looks like a nail.
Those grapes are probably sour anyway.
edit: To make a less snarky contribution, there’s always a difficult balance between “those people are doing something that seems weird to me, I should probably just ignore them and go my own way” vs “if smart people are doing something that seems weird, it’s probably for a good reason, maybe I should learn it”.
If you’re suggesting that I say I don’t think branching is useful because I can’t do it well in svn, or something like that, then I can’t say much other than that you’re mistaken. If you’re not suggesting this, please clarify.
Yes, I have learned about branching workflows. I decided that they don’t make sense for most of my repositories. For example, the repository I commit most often to is primarily a collection of text outlines on a variety of subjects. How would a branching workflow help me here? It wouldn’t. In the 3 years I’ve been using this repository, branching never seemed like a good idea. Branching just seems like extra friction in the process. My impression is that many git people probably would branch in this case, and I don’t understand what benefits they get from that. If you’re aware of any, I’m listening.
The larger project my PhD is a part of uses git with a pretty standard git workflow, which I agree makes sense for the project. My claims are that large software projects have different requirements than small software/documentation projects, and that you might find different tools to be useful in each case.
Edit: If you thought the hammer sentence was snark, sorry for that. It was my attempt to explain why some people who use git might branch more often than is needed.
If you don’t need git’s features it’s fine not to use it. I just brought up branching because you left it out of your comparison, but IIRC it’s the main reason git was even created.