Open Menu dzosoft
Close Menu dzosoft

   ALL ABOUT COMPUTER SCIENCE AND TECHNOLOGY


                             










 
 
 

Git vs SVN: Centralized and Distributed Version Control

 

 
Git vs SVN: Centralized and Distributed Version Control
 

To get an overview of the changes made to documents or files, there are so-called version controls. These save all versions generated by a processing, including user ID and time stamp, in an archive, so that previous states of the individual data can be called up or restored. For this it is possible to see which users have made changes at a given time. The intended objectives of a system of this type are to coordinate the common access of different users to files and to allow the simultaneous development of different branches (development branches and divisions).

Version controls in software development are usually used for office applications and CMSs. Among the most famous programs for version control are Apache Subversion (SVN) and Git, which can either be installed on your server or requested from a provider. The most famous hosting service for Git projects is GitHub , while Subversion hosting is offered for example by RiouxSVN . On services like SourceForge it is possible to host both systems.

 

SVN: The successor of CVS designed by CollabNet

 
The free software Subversion was developed in the early 2000s by CollabNet and almost four years later released in its first version. Therefore SVN was the successor of CVS (Concurrent Versions System ), now no longer implemented. In 2009, the project passed to the Apache Software Foundation, hence its name Apache Subversion.

SVN uses a central management control system. This means that there is a folder (repository) that all users can access. Since the changes you make cannot be merged together, the system prevents two users from processing the same file at the same time. Thus the file is assigned to the first user who accesses it and during processing it is marked to the other users as "write protected". Apache Subversion also offers the ability to download and process any subpath independently of the rest of the path tree. For this it is possible to assign different read and write permissions to different readers for all paths. Furthermore, Subversion is characterized by the fact that it is possible to record empty, renamed and moved folders even without losing the history.

centralized and distributed version control
 

Git: Linux kernel developers' emergency solution

 
The creator of Linux, Linus Thorvalds, began in April 2005 (more or less unintentionally) the development of a new version control software. The reason was that due to a change in the license of the BitKeeper used until today, the developers of the Linux kernel lost their free access. The new system should offer similar processes such as BitKeeper and security against accidental or intentional changes and also ensure high efficiency. Just a few days later Thorvalds presented the first version of Git.

Git is a distributed management control system. In fact, there is a central repository, where all the changes converge, even if all users download their working copies. However, they have access to the entire repository including the history locally and do not need to be constantly connected to the network. Also changes are pushed very fast in the main repository. Git therefore does not offer any locking system, but each user creates his own branches which are then uploaded to the central repository; generally each user receives read and write permissions for the directory (however if several permissions exist, several root directories must be created). Each working copy is an independent backup of the root directory, which is highly recommended in case a fault occurs or is damaged. Git only logs the contents of directories as empty directories are automatically deleted.

 

SVN vs Git: systems compared

 
But what is the best solution then? There is no generic answer. It depends on which management control system best suits your purposes. Both systems differ in structure and in the resulting process. The following table summarizes the main differences:

SVN extensionGit
Version controlCentralDistributed
Repositories Central repository where working copies are created Local copies of the repository that you can work with
Access permission Path based Throughout the directory
Viewing changes Record files Record content
History of changes Full in repository only, working copies contain only the latest versionRepositories and working copies contain the complete history
Network connection At each access Only needed for syncing

Here are the respective advantages of both systems:

 

You should prefer Git if

 

 You don't want to be connected all the time so you can work on your project from anywhere.
 You want to feel secure in the event of a central repository failure or data loss.
 You don't need read and write permission for special directories (however these can be set to a more complex path with Git as well).
 Place greater importance on fast transmission of changes.

 

Subversion is the best choice if

 

 You need path-based access permissions for different areas of your project.
 You want to link all your work to one central location.
 You work with many binary files.
 You want to fully register empty directory structures (Git deletes them, since they have no content).

If the listed features are not of decisive importance to you, a test of both version control systems is recommended. In both cases, you are guaranteed good support from a large community, a reliable provider like GitHub and professional support offers.




It might also interest you


How to Use Git and GitHub: Beginner's Guide

How to set up a free SVN repository

Track your changes with the best versioning software


Leave comment
          

Save nickname and email in this browser for the next time.



Loading...