views:

859

answers:

16

What would be the best version control system to learn as a beginner to source control?

A: 

Anything, but I would learn a modern system like git or subversion myself. My first VCS was RCS, but I got the basics down.

Thomas Owens
A: 

Well, if you are just wanting to learn on your own, I would say you should go with something free, like subversion. If you are a company who has never used source control before, then it really depends on your needs.

Craig H
+7  A: 

I'd suggest you try Subversion, for example with the 1-click SVN installer. Try searching SO for "Subversion", and you'll find loads of questions with answers that point to good tutorials.

Good luck!

onnodb
A: 

My first exposure was CVS with WinCVS as a client. it was horrid. Next was Subversion, with TortoiseSVN and Eclipse's integration. It was intuitive, and heavenly. I think that using CVS with TortoiseCVS and Eclipse's would be nice as well, though I prefer the way SVN handles revisioning. The entire repository is versioned with each check in, not individual files.

Chris Marasti-Georg
+5  A: 

There are a few core concepts that I think are important to learn:

  1. Check-ins/check-outs (obviously)
  2. Local versions vs. server versions
  3. Mapping/Binding a local workspace to a remote store or repository.
  4. Merging your changes back into a file that contains changes from others.
  5. Branching (what it is, when/why to use it)
  6. Merging changes from a branch back into a main branch or trunk.

Most modern source control systems require some knowledge of the above topics and should help facilitate you learning them. Then you have distributed source control, which I don't have any experience with but is supposed to be fairly complicated and may not be suitable for a beginner.

Subversion is great because it has all of the modern features you'd want and is free.

Git is also becoming an increasingly popular option and is another free or very low cost alternative to Subversion. Knowledge regarding the concepts of branching and merging become critical for using Git, however.

You can use unfuddle as a free and easy way to experiment with both Git and Subversion. I use it to host a couple of subversion repositories for some side projects I've worked on in the past.

Jesse Taber
+21  A: 

Anything but Visual Source Safe; preferably one which supports the concepts of branching and merging. As others have said, Subversion is a great choice, especially with the TortoiseSVN client.

Be sure to check out (pardon the pun) Eric Sink's classic series of Source Control HOWTO articles.

Ian Nelson
No, i will not pardon the pun as it was more clever and subtle than pun. 80)
Keng
I must admit I do not understand your comment Keng!
FortunateDuke
A: 

I'd also recommend Subversion. It does not take too long to set up, it is free, and there is a really good book available online that goes over the basics as well as some advanced topics: http://svnbook.red-bean.com/

crashmstr
A: 

Subversion with tortoisesvn. (tortoisesvn because you can see a lot of what goes on visually and will provide a good jumping off point for the command line stuff. ) There is tons of documentation out there and most likely you will see it at least one point in your career. Almost every company I have worked for and interviewed with runs SVN.

Maudite
+2  A: 

I found http://unfuddle.com saved me messing about with installing SVN or git. You can get a free account in there and use either of those - plus you can use your OpenID there.

Then you avoid having to mess about setting it up right and focus on how you're going to use it!

Brabster
I will have to check this out.
FortunateDuke
+1 for the reference to unfuddle. That's a great way to get your feet wet with either Git or Subversion.
Jesse Taber
+1  A: 

@Ian Nelson:

I agree with you that Source Safe is bad as a source control system, but keep in mind that using Source Safe is a lot better than "carrying around floppy disks" as Joel Spolsky said.

For a beginner it might not be a bad idea, since the cost of having no source control at all is a lot higher.

Patrik
That's subjective, SS can corrupt it's database and you might not realise it until months later. So you would still loose all your version control history.
Makis
I think your comment is as subjective as mine. Source Safe CAN corrupt it's database, but a hard drive can crash. If you at least use Source Safe, you will have it both on your hard drive and stored in source control.
Patrik
+2  A: 

Vault from SourceGear.com is superb. It is free for single users and provides a superb VS 2005/2008 interface. I love it!

rp

rp
A: 

If you're looking to learn a commercial product while getting started Perforce provides a free client and server, with the server supporting two users and five client workspaces.

At my previous place of employment it was used religiously not only for code by our programmers, but for art assets and game levels, and my own documentation.

Mike Wagner
+2  A: 

I'm not and advanced source control user, but I'm learning. Here is my experience with source control products:

  1. A long time ago, the company I was working for at the time decided to use source control. They introduced the concept to developers and got eveyone willing to give it a try. They chose to use PVCS, and implemented it. Before too long, developers would have to coordinate to lock/unlock modules and objects and we really didn't see much benefit.

  2. A few years later, I was playing around with making an open source project and at the time rubyforge was offering CVS repositories. I tried it out and it was marginally better than PVCS. Granted I was the only one using the repository. I did however become frustrated when I tried to rearrange the structure of my files because I didn't like the way I had initially imported them. It didn't really work out in CVS.

  3. A few years after that I was working on another personal project and my web hosting provider offered easy to setup Subversion (SVN) repositories. It took me a little bit of research to get it up and running correctly, but once I got past the initial learning curve, I liked it.

  4. Not long after that I realized that I liked having source control and that my current job didn't have it. So I evangelized, and after a long period of time, my team implemented Source Safe because we work in Visual Studio and are generally a Microsoft shop. I was eager to use it, but before long I found that I was losing files and that Visual Studio was putting things in the wrong place and that I'd work on a project for a while and then go to export my work to another location and find that it either wouldn't export or would only export some of the projects in a solution. This made me realize that even though I thought I was using a "version control system", the copy of the code that was most secure, robust and complete was my working copy. The exact opposite of what source control is supposed to do.

  5. So last week I was so fed up with Source Safe that I went searching. After looking into a few solutions, I decided to try git. I won't say it's all been roses, since I have again had some learning curve to get it to do what I want it to do, However, I have liked it enough to convert all of my work and personal projects over to it. One of the really nice things about it is that I don't need a centralized repository so I can use it without going through a ton of red tape at work to get it installed.

So in short I would reccommend git, I use Mysysgit in windows and it has the added bonus of giving me a bash shell. On Linux you can just install it from your package manager. If you don't like git, try subversion. If you don't like either of those you probably won't like CVS or PVCS either. Under no circumstances try Source Safe, it's awful.

Jamal Hansen
+5  A: 

I'd go straight for Git. I've used subversion before, but always felt like I was doing it wrong. Git made sense from day one.

Useful resources:

Rich Apodaca
Yes, I think Git is the simplist and most robust of any Source/Version control solution. I've used SVN, CVS, ClearCase... And I feel Git has been the best, simplest, and cleanest solution yet.
Joseph Silvashy
A: 

Each tool has it's strengths and weaknesses. It's very much a question of what your requirements are. Unfortunately with this issue, like many others, it's often not the best tool that is selected but the one that someone is familiar with. For instance, if you don't require many branches and your team is small and local, almost any vcs will do the job (except SourceSafe). Things change if you need branches (which almost by necessity means you also need to do merges), your team is distributed, you need advanced security (subcontractors are not allowed to entire source tree), task tracking, etc. There is also the question of cost in three different ways: cost of licenses, cost of maintenance (some tools are so complicated that you in practice need someone just to control the repositories) and cost of training.

Therefore suggesting one tool over another is like suggesting what would be the best programming language.

Just some pointers:

  • StarTeam is the easiest of the tools I have used. It required very little training. I got a one-day training since I was to be the maintainer. This maintaining took me less than 30 minutes per week. Users I "trained" by writing a two-page manual and after that I had very few questions to answer.
  • Continuus was the other end of the scale as far as ease of use is concerned. On the other hand task handling was great and it offered good support for release management. Trouble is, even as a release manager I never thought ease of making releases (it was once you learned how, but that took a considerable amount of time) should be more important than the daily work that developers do.
  • Merging and branch creating differs wildly between tools. Some tools make this simple, like git and ClearCase (although the latter is very slow) some basically force you to do the merge by hand. If you need to do merges a lot, the cost can get high. ClearCase was also expensive in all three categories mentioned before (although it has to be said we used all the advanced stuff which isn't necessary). Git on the other hand lacks a good UI and some of concepts differ from what you might be used to. Git's security features are also lacking (gitosis addresses some issues but not all).
  • Most tools I have used are also quite slow. Tools like PVCS/Dimensions was just slow, no matter what (basic things like opening a directory in the repository), some very slow in more specific ways (like ClearCase).

From the tools I have used I would select StarTeam if your developers are not very experienced (and if you don't mind paying the license, which is quite expensive) and git if you have some experienced vcs guys onboard who can set up the environment to other guys. Mercurial also looks like an interesting competitor and seems to have slightly better UI's.

Continuus, PVCS/Dimensions and ClearCase are just too slow, too complex and too expensive for almost any project. If someone insist on selecting one of these, I would go for ClearCase.

I haven't used Subversion which many seem to like (yet, I have a feeling this is about to change in the near future) so can't comment how it compares to the other tools I have used (usually as a build and/or release manager).

As for the first tool to choose, problem with Git, Bazaar and Mercurial is they are distributed vcs's. This is different from the traditional server-client model where you have a central repository. For just learning the stuff I would recommend also reading about the concepts. Branching for instance is something that you might not understand correctly just by trying yourself (there are different branch strategies for different situations). Plus it is very different if you are the only one accessing the repository, merge conflicts for instance wouldn't be a problem (you might get to see them but you would easily also fix them since you know the code in both branches). Of course you would learn about check outs, check ins, and such but I don't think these issues are particularily difficult in the first place.

Added problem with vcs's is that they tend to use different terms. In StarTeam which is otherwise easy to use they for some reason insist on using the terms "check out" and "check out and lock". The latter is what most people think the first does. There is a reason for this (you can edit files even if you don't have an exclusive lock), but it would still make much more sense to call these "Get" and "Check out" to avoid confusion.

Makis
A: 

Subversion is good place to start with. It is very stable and modern version control system. Best online resource to start learning about Subversion would be Version Control with Subversion. There are lot of choices as far as server and client softwares are concerned. I personally prefer (for Windows environment).

  1. VisualSVN server

  2. TortoiseSVN shell-integrated client and

  3. AnkhSVN Visual Studio Subversion Add-On

Again, with Subversion there are lot of options available. Also, it is a continually evolving version control system (unlike outdated SourceSafe). It could be easily integrated with numerous automated build tools (CruiseControl, FinalBuilder) and bug/issue tracking systems (JIRA).

If you are looking for state-of-the-art version control systems, go for Git(developed by Linus Torvalds). But if you are totally new to version control systems, I would suggest start with subversion.