Ask HN: Learn Subversion or Git?
I am trying to convince a professor to teach one of these technologies in a sophomore level programming course at my university.
What are the benefits of learning a VCS early?
Between Subversion and Git which would be best for students to learn? Absolutely they should learn a VCS early. Personally, I would recommend Git over Mercurial, with svn a very distant third. But mostly you'll get people trotting out their prejudices here. The main deal, without question, is to do something. I would start with Git because so many open source projects are on Github. But, I would also learn the basics of Mercurial and Subversion. I think it's hugely important to learn how to interact with VCS for software development. It makes backing up easier, it makes debugging easier, it makes releasing software easier. It is a necessary skill in the professional world. Currently, it's also the way software developers talk to each other. Even if students don't come away intimately knowing a VCS, they should be aware they are out there, and the common usage patterns they enable. It would be useful for the course to give a little background in VCS and DVCS concepts and then an introduction to the major types. From there both subversion and git/hg could be used hands on to practice the concepts. The developer world seems to be leaning towards git, so perhaps spend the most time there. But again, the basic concepts and workflows should be stressed no matter what, because tools come and go. At my university, most of the upper-level classes had some kind of group programming project component. We were required to use SVN, although no formal instruction in its use was given. You were expected to figure it out on your own or communicate with other students who knew how to use it already. (This was an ongoing theme in the curriculum.) The approach worked very well. From an instructor's point of view, you can see who is (and who is not) contributing to a project if you have access to the repositories. Personally I don't care for Subversion, but it might be easier to grasp for a first-timer. One of the big advantages of Git over Subversion in a teaching context is that, due to it's decentralized nature, every git repository is fully self-contained and stands on its own. So for experimenting it's much easier to create a git repository in one directory of your (Windows/Linux/MacOS/...) home directory, add files, then clone it to a second directory, change things, push back, ... You don't have to bother setting up a subversion server! Git would be cool to play in a distributive way between the students. Use / learn Git, however it wouldn't be terrible to know both. Git. Don't bother with subversion. In 2012, the question should be Git or Mercurial? Your point is well taken, but it may still be necessary to know others - for example, I work at a large and well-known Internet company and we use Perforce =) I am not familiar with Mercurial. Would it benefit students to learn it over Git? Well, Git or Mercurial are equally powerful and both are DVCS (Distributed) which SVN is not. If anything, mercurial is said to be easier to learn if you already know SVN, but both are similar. Git use UNIX philosophy of many complementing tools whereas Mercurial uses a monolithic approach, a single unified powerful tool. Go with Git. Although I never used Mercurial personally, I considered it at one point because it was in Python but someone else mentioned the fact that there is a version difference because of the split between Python 2 and Python 3. That can complicate things.