SVN and Git are two applications that are often used by programmers. But if you are not one of them, or just getting started, you might not know the differences between them. That’s exactly why I wrote this article, so keep reading to find the answer.
Git is a distributed version control system while SVN is centralized, which means Git doesn’t require a central server to host the files. From a user perspective, SVN is easier to use with great tools available, whereas Git is faster, especially on large projects.
Let’s start by seeing how each software works before comparing them on their main differences.
What is SVN?
Apache Subversion (often abbreviated SVN, after its command name svn) is a software versioning and revision control system distributed as open source under the Apache LicenseWikipedia
As a whole, SVN is a tool allowing developers to work simultaneously on the same project. The files are hosted on a server and each change is merged with the files stored on it, without overwriting anyone else edits.
Subversion has been created in 2000. With the fast adoption pace of Internet, it was a good time to improve solutions to work together for developers. SVN has been released as an improvement of CVS, an older technology with the same goals, fixing bugs and adding new features to it.
How SVN works?
Source code is centralized on a server, and each developer in the project is using a tool to download and upload a new version to this server. After each change, developers send their new version to the server, to make it available for other users in their team.
The server is named a repository, downloading a new version is an update and uploading changes to the server is a commit. Using that kind of technology when working on any project with several developers is mandatory, the alternatives are to work on a different schedule or include other changes manually, which either way is not efficient at all.
How to use SVN?
Using SVN requires a server that can be hosted on the local network on in the cloud. Any server can do this, the requirements are minimal. It can be installed on any hosting solution like VPS or dedicated server for example.
There are also companies offering SVN hosting, but I don’t have any experience with them, so I can’t recommend any of them.
Once the server installed and the repository created, a user and password needs to be created for each developer. Project members will then use a tool like TortoiseSVN on their computer to connect to the repository and synchronize their source code.
The sooner is the better to put that kind of system in place, even if there is still one developer for now, it’s a good practice to think about this.
What is Git?
Git is software for tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows (thousands of parallel branches running on different systems).Wikipedia
So, in short, the goal of Git is to help programmers to work together on the same project, avoiding conflicts when working on the same files.
Git has been created in 2005. Linus Torvalds, the creator and main maintainer of the Linux kernel, has created it in a goal to create a distributed system for version control. Concurrent solutions were not good enough for him at this time, and he has started this project to improve them.
How Git works?
There is no central server with Git. Each developer has the code on its computer, which is defined as a branch.
A project has a starting work, then two developers can work on the same files adding different features for a different period of time. Git will then be used to merge all changes when the developer, consider its version ready to share with others.
It’s a bit complicated to explain all of this in a few lines, but Git is powerful, as it can be used without a network for a long period of time, handle large projects and still be fast enough on a daily basis.
How to use Git?
Even if there are no servers required for Git, most projects will be created with a service like GitHub or a GitLab server. They act as an additional developer and provide a web interface for developers. They are also useful for backups if needed.
Once you have an account on GitHub, you can create some files in a new repository, and synchronize them with your computer using a Git client. On Linux, there is a “git” package available on any distribution, and for other systems, GUI clients can be found too.
Differences between Git and SVN
|Centralized and open-source version control system
|Distributed version control system
|Created in 2000 to improve CVS
|Created in 2005 by Linus Torvalds
|Easy to use, great tools available
|Speed, easy to start, a server is not mandatory
|Doesn’t work offline, the server is critical
|Not user-friendly for beginners, full checkout is mandatory