Solved: OS X Yosemite git svn broken

I upgraded from OS X Mavericks to Yosemite and my git svn broke as a result.

I use Git and Subversion both in my development. Some Git repositories link up to Subversion repositories which I then push to Git and commit to Subversion using git svn dcommit.

The Problem with git svn in Yosemite

I usually just use the Terminal for command line for Git. Running git svn command gave me this error:

Can’t locate SVN/ in @INC (you may need to install the SVN::Core module)

Along with that some paths of what INC contains.

The Requirements

The main and only requirement that I had to do was to update my XCode in OS X to ensure that I have the latest command line tools, that’s all. XCode is large but you may struggle trying to link up an older version of SVN in XCode with a newer version of SVN in the Perl on your Mac OS X. Yosemite comes with Perl 5.18 (5.18.2 at the time of writing this article.).

If you don’t want to install the full Xcode package, see Mac OS X: Installing Command Line Tools without Xcode. It is much quicker and includes the SVN package.

The Solution

You need to link up your SVN correctly using this command:

sudo ln -s /Applications/ /System/Library/Perl/Extras/5.18/SVN

Then run git svn again and you’ll get a different error:

Can’t locate loadable object for module SVN::_Core in @INC

We’re making some progress now. The Subversion core is found since you linked it up but some other objects cannot be found. So run this command:

sudo ln -s /Applications/ /System/Library/Perl/Extras/5.18/auto/SVN

And that’s it, run git svn again and you’ll see something like this:

Antonies-MacBook-Pro:newsletters-lite contrid$ git svn
git-svn – bidirectional operations between a single Subversion tree and git
usage: git svn [options] [arguments]

That is, if you’re inside a working Git directory. Either way, you’ll notice that it works.



  1. The issue for me was that a long time ago I set ‘defaults write Prefer-32-Bit -bool yes’ to accommodate perl modules that hadn’t gotten to 64 bit yet. I had to set that to no and it started working. Error was a bit different, it was finding the SVN module but complaining that it was the wrong architecture, which was very puzzling because ‘file blah’ said all the right things…

  2. Thanks, this worked perfectly for me 🙂

  3. boom, there it is!

  4. Thank you a million Mr A. Great work. Helped me out and worked perfect!

  5. Is there a similar fix for El Capitan that doesn’t require disabling System Integrity Protection?

Leave a Reply

Your email address will not be published.


© 2021 Contrid

Theme by Anders NorénUp ↑

Pin It on Pinterest

%d bloggers like this: