Skip to content
Fix Code Error

Why is Git better than Subversion?

March 13, 2021 by Code Error
Posted By: Anonymous

I’ve been using Subversion for a few years and after using SourceSafe, I just love Subversion. Combined with TortoiseSVN, I can’t really imagine how it could be any better.

Yet there’s a growing number of developers claiming that Subversion has problems and that we should be moving to the new breed of distributed version control systems, such as Git.

How does Git improve upon Subversion?

Solution

Git is not better than Subversion. But is also not worse. It’s different.

The key difference is that it is decentralized. Imagine you are a developer on the road, you develop on your laptop and you want to have source control so that you can go back 3 hours.

With Subversion, you have a Problem: The SVN Repository may be in a location you can’t reach (in your company, and you don’t have internet at the moment), you cannot commit. If you want to make a copy of your code, you have to literally copy/paste it.

With Git, you do not have this problem. Your local copy is a repository, and you can commit to it and get all benefits of source control. When you regain connectivity to the main repository, you can commit against it.

This looks good at first, but just keep in mind the added complexity to this approach.

Git seems to be the “new, shiny, cool” thing. It’s by no means bad (there is a reason Linus wrote it for the Linux Kernel development after all), but I feel that many people jump on the “Distributed Source Control” train just because it’s new and is written by Linus Torvalds, without actually knowing why/if it’s better.

Subversion has Problems, but so does Git, Mercurial, CVS, TFS or whatever.

Edit: So this answer is now a year old and still generates many upvotes, so I thought I’ll add some more explanations. In the last year since writing this, Git has gained a lot of momentum and support, particularly since sites like GitHub really took off. I’m using both Git and Subversion nowadays and I’d like to share some personal insight.

First of all, Git can be really confusing at first when working decentralized. What is a remote? and How to properly set up the initial repository? are two questions that come up at the beginning, especially compared to SVN’s simple “svnadmin create”, Git’s “git init” can take the parameters –bare and –shared which seems to be the “proper” way to set up a centralized repository. There are reasons for this, but it adds complexity. The documentation of the “checkout” command is very confusing to people changing over – the “proper” way seems to be “git clone”, while “git checkout” seems to switch branches.

Git REALLY shines when you are decentralized. I have a server at home and a Laptop on the road, and SVN simply doesn’t work well here. With SVN, I can’t have local source control if I’m not connected to the repository (Yes, I know about SVK or about ways to copy the repo). With Git, that’s the default mode anyway. It’s an extra command though (git commit commits locally, whereas git push origin master pushes the master branch to the remote named “origin”).

As said above: Git adds complexity. Two modes of creating repositories, checkout vs. clone, commit vs. push… You have to know which commands work locally and which work with “the server” (I’m assuming most people still like a central “master-repository”).

Also, the tooling is still insufficient, at least on Windows. Yes, there is a Visual Studio AddIn, but I still use git bash with msysgit.

SVN has the advantage that it’s MUCH simpler to learn: There is your repository, all changes to towards it, if you know how to create, commit and checkout and you’re ready to go and can pickup stuff like branching, update etc. later on.

Git has the advantage that it’s MUCH better suited if some developers are not always connected to the master repository. Also, it’s much faster than SVN. And from what I hear, branching and merging support is a lot better (which is to be expected, as these are the core reasons it was written).

This also explains why it gains so much buzz on the Internet, as Git is perfectly suited for Open Source projects: Just Fork it, commit your changes to your own Fork, and then ask the original project maintainer to pull your changes. With Git, this just works. Really, try it on Github, it’s magic.

What I also see are Git-SVN Bridges: The central repository is a Subversion repo, but developers locally work with Git and the bridge then pushes their changes to SVN.

But even with this lengthy addition, I still stand by my core message: Git is not better or worse, it’s just different. If you have the need for “Offline Source Control” and the willingness to spend some extra time learning it, it’s fantastic. But if you have a strictly centralized Source Control and/or are struggling to introduce Source Control in the first place because your co-workers are not interested, then the simplicity and excellent tooling (at least on Windows) of SVN shine.

Answered By: Anonymous

Related Articles

  • (Java) Static member accessed via instance reference…
  • How do SO_REUSEADDR and SO_REUSEPORT differ?
  • Why do I have to "git push --set-upstream origin "?
  • Checkout another branch when there are uncommitted…
  • How to deep clone the state and roll back in Vuex?
  • Getting breed type
  • git pull while not in a git directory
  • Git push won't do anything (everything up-to-date)
  • Unable to begin a distributed transaction
  • Use of Jquery on scroll event
  • Git Using Remote Branch
  • SVN upgrade working copy
  • Git - Pushing code to two remotes
  • Migration of repo from Bitbucket to Gitlab does not…
  • The definitive guide to form-based website authentication
  • Why do git fetch origin and git fetch : behave differently?
  • How do I make a Git commit in the past?
  • Retrieve specific commit from a remote Git repository
  • How to bind Backbone model to jqGrid?
  • How to find the nearest parent of a Git branch?
  • How to recover stashed uncommitted changes
  • What's the difference between "git reset" and "git…
  • Getting started with Haskell
  • Adding Dynamic Input Fields With VueJs
  • git switch branch without discarding local changes
  • How can I find the location of origin/master in git,…
  • What's the difference between HEAD^ and HEAD~ in Git?
  • Create a dataframe from the model
  • Safe truncate string contains color tag
  • Why call git branch --unset-upstream to fixup?
  • Why does C++ code for testing the Collatz conjecture…
  • Git submodule update
  • Logging best practices
  • What is "git remote add ..." and "git push origin master"?
  • Git workflow and rebase vs merge questions
  • How to download Xcode DMG or XIP file?
  • In plain English, what does "git reset" do?
  • What are the differences between git remote prune,…
  • How to track untracked content?
  • Peak signal detection in realtime timeseries data
  • i am trying to center my an article with header and…
  • What is your most productive shortcut with Vim?
  • How do you remove Subversion control for a folder?
  • No 'Access-Control-Allow-Origin' header is present…
  • What equivalents are there to TortoiseSVN, on Mac OSX?
  • Maven2: Missing artifact but jars are in place
  • Why does git perform fast-forward merges by default?
  • What is the incentive for curl to release the…
  • What are the undocumented features and limitations…
  • Database development mistakes made by application developers
  • Is it safe to shallow clone with --depth 1, create…
  • Various ways to remove local Git changes
  • How do you clear the SQL Server transaction log?
  • How to retrieve a single file from a specific…
  • How would I be able to multiple select and pass data…
  • Does "git fetch --tags" include "git fetch"?
  • python 3.2 UnicodeEncodeError: 'charmap' codec can't…
  • Recalculate merge conflicts (ie. how to generate…
  • Start redis-server with config file
  • Cannot connect to repo with TortoiseSVN
  • How to backup a local Git repository?
  • Smart way to truncate long strings
  • Why does Git say my master branch is "already up to…
  • git lfs push to github failure on Ubuntu 18.04
  • Git merge with force overwrite
  • Reverting to a previous revision using TortoiseSVN
  • Setting up and using Meld as your git difftool and mergetool
  • Can I prevent pull requests being merged at certain…
  • What does "Fatal error: Unexpectedly found nil while…
  • NSPhotoLibraryUsageDescription key must be present…
  • XMLHttpRequest cannot load ✘✘✘ No…
  • How to fix Git error: object file is empty?
  • Java 8: Difference between two LocalDateTime in…
  • What's the difference between .NET Core, .NET…
  • Output not incrementing correctly - C++
  • Memcached vs. Redis?
  • Error reading JObject from JsonReader. Current…
  • How to pull in changes from skeleton sub-repository…
  • What are the real-world strengths and weaknesses of…
  • Chrome DevTools Devices does not detect device when…
  • Automatic population of Backbone.Collection using…
  • What does this symbol mean in JavaScript?
  • Git: Create a branch from unstaged/uncommitted…
  • Retrieve the commit log for a specific line in a file?
  • Spring data jpa- No bean named…
  • Comparison between Corona, Phonegap, Titanium
  • #define macro for debug printing in C?
  • When should one use a spinlock instead of mutex?
  • Python timedelta in years
  • What's the best way of scraping data from a website?
  • Git's famous "ERROR: Permission to .git denied to user"
  • How to dispatch a Redux action with a timeout?
  • How to Update Database from Assets Folder in App
  • Is quitting an application frowned upon?
  • "Thinking in AngularJS" if I have a jQuery background?
  • TortoiseSVN icons not showing up under Windows 7
  • Reference — What does this symbol mean in PHP?
  • Invoke or BeginInvoke cannot be called on a control…
  • Vue.Draggable Not Moving Component
  • How do I install Java on Mac OSX allowing version switching?

Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.

Post navigation

Previous Post:

React – How to get parameter value from query string?

Next Post:

What is the purpose of the word ‘self’?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

.net ajax android angular arrays aurelia backbone.js bash c++ css dataframe ember-data ember.js excel git html ios java javascript jquery json laravel linux list mysql next.js node.js pandas php polymer polymer-1.0 python python-3.x r reactjs regex sql sql-server string svelte typescript vue-component vue.js vuejs2 vuetify.js

  • you shouldn’t need to use z-index
  • No column in target database, but getting “The schema update is terminating because data loss might occur”
  • Angular – expected call-signature: ‘changePassword’ to have a typedeftslint(typedef)
  • trying to implement NativeAdFactory imports deprecated method by default in flutter java project
  • What should I use to get an attribute out of my foreign table in Laravel?
© 2022 Fix Code Error