Git and SVN are version control systems. Both are better than no version control system so you win no matter which you choose. There are some important differences between Git and SVN which might make one more suitable for your type of project than the other. It’s not a question of which is better, but which is best suited for your situation and development process.
SVN is easier to use than Git
SVN has been around longer. There are tons of tools available which make using it easier for non-technical users. SVN error messages make more sense. If the version control system will be used by managers, graphic designers or other non-developers, SVN is a better choice. With TortoiseSVN anybody tech-savvy enough to browse for files can easily use SVN. Git has a much higher learning curve than SVN.
Why is Git so popular if it’s harder to use?
Git is the new kid on the block, SVN is old-school. Don’t get me wrong, Git deserves it’s popularity. Git is fast and excellent for managing large open source projects with many collaborators. While branching is possible with SVN, branching and merging is what Git was built to do. Git may be harder to learn, but once you do learn how to use Git, you’ll find it to be very feature rich and functional. Another huge advantage to Git is the GitHub website which makes programming a social activity. GitHub lets you connect with and follow other developers, sort of like Facebook for software developers. It makes coding more fun, and even makes it possible for less technical people to take part in the development process.
What is the main difference between Git and SVN?
Subversion offers a centralized model whereas Git offers a decentralized model. What does this mean? With git, everyone has their own copy of the entire repository. Basically, everyone is always working on their own branch and functional code can later be merged into the master. With SVN, everyone has a working copy and changes are committed to a central repository. To work on a branch a user must copy the trunk into another directory and then merge it back when complete.
Why are you using Git for Battle City?
Battle City is an open source multiplayer game. It’s a big project which I hope will grow to have many developers from all around the world. So why not create an SVN repository for Battle City? In my experience, Git better manages the chaos involved with an open source project that has many collaborators contributing random bits of code. SVN is better suited for a more structured development process, where tasks are defined and the team knows who is working on what.
Git allows any developer to sit down, get a copy of the Battle City repository, and then just start messing around with whatever they feel like. Eventually, once the developer is ready to share their changes, they can push their code their own branch of Battle City. GitHub makes it possible to easily track and follow other branches, and eventually, good changes in a branch can be merged into the master. In my experience, Git with GitHub will make managing user contributions and maintaining a master version much easier than SVN.
Confused? The GitHub website is full of helpful documentation and resources to help you get started!
So… Should I use Git or Subversion?
It’s really a matter of preference. Anything you can do with one you can do with the other. If your project involves lots of branching and merging, I’d recommend Git. Keep in mind, not all projects involve branching or merging.
Take Battle City for example. Before Battle City was released as open source, back when only one or two people worked on the code at any given time, all commits were done to a central SVN repository. This made sense because there was a project plan and list of features to develop. It was easy to watch the central repository and track progress.
Once Battle City was released as open source, development became a free-for-all. Contributors could work on anything, experiment with new ideas, even create conflicting items. If all commits were still done to a central repository, the project would never again compile and so branches became important.
Branching can still be done with SVN and within a company or organization this might make sense because a manager could check progress of new features by looking at the commits on branches and merges to the trunk. With open source however, you don’t care what others are doing or about tracking their progress, you are simply thankful for any contribution.
Git allows users to download their own copy of the repository, do their own thing, and check back in if ever they have anything useful they want to share.
Git vs SVN Conclusion
So should you use Git or should you use Subversion? Take a look at your situation and your project and make a decision because neither is best, but one is often better for what you are doing.
Related posts from around the web:
http://robwilkerson.org/2008/04/05/subversion-or-git/
http://git.or.cz/gitwiki/GitSvnComparsion
Need Fast Reliable Web Hosting?
Need to register a web site? Sign up with Host Gator! Yes, that’s an affiliate link, but let me tell you why you’ll click it anyways… Host Gator is affordable, fast and reliable. Most importantly, they have the best service of any web host I have dealt with including an easy to use Help & Support Forum. You speak to real people, not robots or people reading a generic script.
Once you try Host Gator, you’ll never register a website anywhere else.