// I need to

ModernizeUpgrade without breaking it RescueFix what someone else started Build NewTurn an idea into a product Reach More PeopleGet found, get used, include everyone

// Company

Case StudiesExpertiseAbout + CareersResourcesContact Book a call →
≡articleBuild New

Confessions of a Git Skeptic

A Subversion user's honest pros and cons after months of daily Git use: faster commands and smooth branching, but still waiting for the promised epiphany.

Art+Logic Feb 14, 20135 min read

From the Art+Logic archive · written in 2013. The tools may have moved on; the thinking still holds.

Software screen capture

A year ago, I was happily using Subversion for my version control, and reading about Git.  It sounded intriguing, and there were lots of articles about the life-changing enlightenment of switching to Git.  Frictionless branching and merging?  A whole new elegant model of file management?  Plus I get to think about directed acyclic graphs?  Cool.

For the last few months, I’ve been using Git pretty much every day.  But sadly, I’m still waiting for the epiphany.  Here’s how I reckon up the pros and cons.  Maybe it will help someone else with this transition.  (Please note that I don’t have the pleasure of knowing other nifty new distributed version control systems like Bazaar and Mercurial.)

Let’s start with the good stuff.

Here’s what bugs me, though: Git complicates my life without giving me much in return.  Here are the bad points.

Let’s see how this plays out in the daily workflow.  In Subversion, you use “svn update” to move the code downstream, and “svn commit” to move it upstream.  In Git, the downstream commands are “git fetch” (to move code to the remote branch) and “git merge” (to the local repository, I think).  The upstream commands are “git add” (to the staging area), “git commit” (to the local repository), and “git push” (to the remote repository).

That’s five commands instead of two.  You can use “pull” to mean “fetch and merge”, but some authorities will advise you not to.  You can also use “commit -a” to avoid the “add”, but you still have to be aware of it.

The staging area is also known as the “index” and the “cached” files.  Yes, you will find all three of these terms used in documentation and tutorials, and they all mean the same thing.  The staging area allows you to commit only some of your work, rather than all of it.  This is something I am occasionally tempted to do, but not something I want to worry about all the time.

The remote branch (for example, “origin/mybranch”) is a strange beast.  It’s a local pointer to the remote repository, and it may or may not be up to date.  It’s involved in the downstream but not the upstream flow, for some reason.

If you want to clean up an unused branch, that’s fine, but remember that you have to do it in both the local and remote repositories, with “git branch -d mybranch” and the amazing “git push origin :mybranch”, respectively.  (To be fair, that second command seems to have embarrassed even the Git developers, so they provided the somewhat clearer “git push origin –delete mybranch”.)

In my current project, we maintain extra repositories on a staging server for deployment, which compounds the extra-steps problem.  I find myself the most Git-savvy person on the team, so it’s my job to explain the Git process to my colleagues, awkwardly: “Yes, I know it’s a pain, but that’s how it works.”  We keep things under control by maintaining detailed sample scripts for everyone to refer to.  We would do the same if we were in Subversion; it’s just that the scripts would be shorter.

To be fair, Subversion made me learn what “peg revisions” are, and what “svn:mergeinfo” properties are.  I guess those just make more sense to me than the Git examples above.

Finally, there are a couple of points that are neither good nor bad, but neutral.

But you don’t need Git to do this!  Subversion has “svn switch”.  It does have an annoying problem that if you specify the wrong URL to switch to, it will trash your local copy rather badly.  However, Subversion seems to have fixed that problem in version 1.7.  (It also fixed the multiple .svn directories problem I complained about above.)

I’m still using Git.  I want to give it a fair trial.  (After all, I remember the transition from CVS to Subversion.  Do I want to go back to CVS?  No, I do not.)  And here’s what I think: Git’s an interesting experiment.  Perhaps my eureka moment is still to come.  Till then, if I have a choice, I’ll stick with Subversion.

Image via http://nvie.com/posts/a-successful-git-branching-model/

keep going

More to explore in Build New.

All Build New resources →
let's talk

Got a problem like this one?

Tell us what's stuck. A real person replies within one business day.

Talk to our team →

Talk to people who know software, not a sales script.

Your first call is with Aja, our VP of Sales. He'll help make sure you're solving the right problem. Here's what you'll cover together:

  1. What you're trying to accomplish

    The business goal first, then the technology.

  2. Possible approaches

    And the tradeoffs of each, in plain language.

  3. Risks you may not have considered

    Technical and business, before they cost you.

  4. Whether AI changes the math

    What's practical, and what's just hype for your project.

  5. Sensible next steps

    Even if the right next step is not us.

book-a-call.ics

Loading the scheduler…

Open the booking page →

Some problems are easier to explain in writing. Send us a few lines about what you're working on, and we'll reply within one business day. Helpful to include:

  1. What the software does, or should do
  2. What's stuck, or what's worrying you
  3. Any deadline or budget you have in mind
note.md

Loading the form…