SVN vs GIT

Mayank C Koli
3 min readOct 6, 2018

Today, we will understand the use of SCM (i.e. source code management) in any IT organization you would work.

SVN or GIT was not so much popular as today. It has become the base of any IT organization which initiate any project.

The major difference what I experienced so far is that it is not decentralized. Imagine you are a developer working on a project. You are not in range to commit code to centralized repo which you have developed on your laptop to a centralized repo. You have to have first get connectivity between your laptop and centralized repo.

But with GIT, It has a cool feature of decentralized your project/repo. Imagine you are a developer working on a project. Again you are not in range to commit code to centralized repo which you have developed on your laptop to a centralized repo. The best feature of GIT is that you can locally commit on your laptop i.e. local repo and once you regain access to a centralized repo, then you can merge the new commits to a centralized repo. That has really made a life of a developer who can now work independently anywhere.

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 License which officially released on 23 February 2004. whereas GIT is a version-control system for tracking changes in computer files and coordinating work on those files among multiple people which is licensed under GNU GPL v2 and developed by Linus Torvald which got released on 7th April 2005. It is primarily used for source-code management in software development, but it can be used to keep track of changes in any set of files.

Below are some major facts which differentiate among each other:

  • Git has a centralized server and repository; SVN does not have a centralized server or repository.
  • The content in Git is stored as metadata; SVN stores files of content.
  • Git branches are easier to work with than SVN branches.
  • Git does not have the global revision number feature like SVN has.
  • Git has better content protection than SVN.
  • Git was developed for Linux kernel by Linus Torvalds; SVN was developed by CollabNet, Inc.
  • Git is distributed under GNU, and its maintenance overseen by Junio Hamano; Apache Subversion, or SVN, is distributed under the open source license.

Workflow of SVN:

First checkout that repository by
#svn checkout <Your URL> svn

Now cd to svn folder, create username folder(Test directory) in svn folder and commit:
#svn commit -m ”Test folder is created.”

Now copy your files in that folder(Test in your case). Now you have to add each new file or new folder:
#svn add filename
#svn add foldername

Now you can commit these files to the server:
#svn commit -m”Some new files are added.”

Workflow of GIT:

First, initialize git
#git init

Clone any project repo
#git clone <Git URL>

Create new file
#touch Readme.txt

Check Status
#git status

Now add files to index and commit them which will eventually push them into local workspace repository
#git add Readme.txt
#git commit -m “New file added”

Finally, push changes to the centralized repository
#git push

Please read and comments if you have any query. I am sharing such information in a simple way for those who are new to this.

!!!!!

--

--

Mayank C Koli

Tech Geek - Wants to share useful info in crisp n short