I upgraded from OS X Mavericks to Yosemite and my git svn broke as a result.
Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Installing Git on a Mac. Open a terminal window. Step 1 – Install Homebrew. Homebrew simplifies the installation of software on the Mac OS X operating system. – Homebrew – Wikipedia. Copy & paste the following into the terminal window and hit Return. “An introduction to git-svn for Subversion/SVK users and deserters” seems to be the most comprehensive description of setup and use cases of Git’s SVN support. “Git SVN Workflow” is also a nice and friendly read. Fink’s git-svn 1.6 package seems to be broken, at least for Mac OS X 10.5. It bus errors on launch.
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.
I usually just use the Terminal for command line for Git. Running git svn command gave me this error:
Can’t locate SVN/Core.pm in @INC (you may need to install the SVN::Core module)
Along with that some paths of what INC contains.
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.
You need to link up your SVN correctly using this command:
sudo ln -s /Applications/Xcode.app/Contents/Developer/Library/Perl/5.18/darwin-thread-multi-2level/SVN /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/Xcode.app/Contents/Developer/Library/Perl/5.18/darwin-thread-multi-2level/auto/SVN/ /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.
I upgraded my Mac to OS X Mavericks 10.9 yesterday evening and everything has been going well, except for one thing with SourceTree and Git SVN repositories. When attempting to synchronize SVN repositories with SourceTree via Git, the following error occurs:
So something’s wrong with OS X’s Perl installation. I couldn’t figure out what exactly, but configuring SourceTree to use your system’s Git installation (instead of SourceTree’s built-in version) seems to do the trick. Here’s how: