Skip to main content
Enterprise Agile Planning icon with arrows

This post is from the CollabNet VersionOne blog and has not been updated since the original publish date.

Last Updated Jul 06, 2010 — Enterprise Agile Planning expert

Leveraging the flexibility of Git and security of Subversion

Enterprise Agile Planning


Unless you’ve been hiding under a rock for the past couple of years, then you’ve more than likely heard about Git, the Distributed Version Control System (DVCS). You probably have developers asking if they can use Git, since it is faster and is built to make branching and merging cheap and easy to use. As a project manager or decision maker, you may also need to evaluate other requirements, such as: a) you need to maintain flexibility in your repository layout using ACLs (for example you can set ‘read+write’ account on ‘/trunk’ for your release manager and ‘deny’ at some level, i.e. ‘/trunk/reallySensitiveFilesDirectory’) b) you need to take backups of your entire repository in one location, knowing you can safely copy your entire history off site, c) you need to store or work with binary files, which requires some type of locking mechanism to prevent collaborators from overwriting one anothers’ changes.

In these regards, Git’s permissions structure, which lacks the granularity of centralized versioning systems like Subversion, has limitations. With Git, you are limited to granting read or write access to users, but not to the sub-director level. There are efforts to improve on this, but at the moment, they lack the maturity of Subversion’s Access Control List (ACL) model. In addition, backing up an entire Git repository is difficult, since Git encourages solo (distributed) development with potentially disjointed segments spread over multiple sites, making it harder to backup *everything* with certainty. Git lacks a locking mechanism, which makes it difficult to work with binary files (Word and PDFs files, etc). Given there is no way to merge binary files (the case for both Git and Subversion), Subversion users rely on locking to prevent impossible merge conflicts arising when 2 people are trying to work on the same binary at once. In Subversion you can lock a file, do your work, and unlock when done.

Git-Subversion Hybrid Approach

One way to benefit from the speed of Git and security of Subversion is to use a hybrid approach. Git even talks to Subversion natively via the ‘svn git’ command, which makes it easy to communicate back and forth between the two systems. One way to think of it is that the server side is Subversion and client side is Git, so all changes you make as a developer will happen locally in your local Git repository, then when you need to share your changes with the rest of the team, push them up the tree to the Subversion server using the ‘git svn dcommit’ command. Now you can leverage Git’s cheap branching and speed, but maintain all the enterprise grade features of Subversion. To illustrate, say I have a repository layout of the following… /branch /src /bin /lib /secretstuff To illustrate, lets checkout a Subversion location from the server. > git svn clone Initialized empty Git repository in /tmp/myproject/.git/ W: +empty_dir: branches W: +empty_dir: tags W: +empty_dir: trunk r1 = 5b406c33fe89223f1024495ab00e4932423e65db (refs/remotes/git-svn) A trunk/somefile.txt ... ... ... Checked out HEAD: r13 creating empty directory: branches creating empty directory: tags * Notice, the ACLs on the Subversion server prevent me from checking out the ‘secretstuff’ folder Make some changes, add files, delete files, etc. > edit, edit, edit > git add file > git add . Save my changes locally > git commit -m "my first commit, yay" Push my changes back to the central SVN server > git svn rebase > git svn dcommit Pull down the latest > git svn fetch > git svn rebaseThis process adds a few extra commands than if you were working in Git alone, but of course you could easily create a command alias or bash script to wrap up several commands into one. Using the Hybrid approach, I get the best of both worlds, including:

  1. Speed and cheap easy branching of Git
  2. Keeping my developers happy, now that they have Git
  3. Flexibility with repository security model using Subversions ACLs
  4. Guarantee that my entire repository history is backed up in one location with Subversion
  5. Flexibility when I want to work with binary files


More from the Blog

View more Government Cloud
Apr 12, 2022 Government Cloud receives FedRAMP Authorization through sponsorship from the United States Department of Veterans Affairs

Enterprise Agile Planning
Flagship Agility solutions can effectively scale agile deve ...
Read More
Nov 22, 2021

What are the qualities of highly effective agile teams?

Enterprise Agile Planning
A team is the core unit of productivity in an agile organization. Wher ...
Read More
Nov 15, 2021

How an open-first attitude revolutionized government tech development

Enterprise Agile Planning
Public perception of government is often that it is slow-moving, reluc ...
Read More
cross functional
Nov 08, 2021

6 best practices for building resilient cross-functional teams

Enterprise Agile Planning
Agile frameworks prize the quality of resilience within every facet of ...
Read More
Contact Us