How to Install Subversion on Mac OS X

Subversion, sometimes called SVN, is an open-source system that remembers every change made to your files and directories. It can be helpful if you'd like to track how your documents have changed over time or to recover an older version of...
Part 1 of 2:

Install From a Binary Package

  1. How to Install Subversion on Mac OS X Picture 1How to Install Subversion on Mac OS X Picture 1
    Navigate to http://subversion.apache.org/packages.html#osx. There you will find a number of binaries that you can download, each having various requirements. Pick the one most appropriate for your needs.
  2. How to Install Subversion on Mac OS X Picture 2How to Install Subversion on Mac OS X Picture 2
    Unzip the .pkg file. It should create a Subversion installer on your desktop. Double click that file, and follow the installation steps as directed.
  3. How to Install Subversion on Mac OS X Picture 3How to Install Subversion on Mac OS X Picture 3
    Open the Terminal, located in the Utilities folder. Alternately, search in Spotlight for Terminal. Enter the following at the [username]$ prompt:
    1. svn [enter]
      How to Install Subversion on Mac OS X Picture 4How to Install Subversion on Mac OS X Picture 4
    2. If that returns "Type 'svn help' for usage," then svn is working correctly.
      How to Install Subversion on Mac OS X Picture 5How to Install Subversion on Mac OS X Picture 5
    3. If /usr/local/bin is not in your path, edit your .profile and add a line like the following:
      How to Install Subversion on Mac OS X Picture 6How to Install Subversion on Mac OS X Picture 6
      1. export PATH=$PATH:/usr/local/bin
    4. Open another Terminal window and try again with: svn [enter]
      How to Install Subversion on Mac OS X Picture 7How to Install Subversion on Mac OS X Picture 7
Part 2 of 2:

Set Up Your Subversion Environment

  1. How to Install Subversion on Mac OS X Picture 8How to Install Subversion on Mac OS X Picture 8
    Set up an SVN server. You will need this to distribute a Subversion project.
  2. How to Install Subversion on Mac OS X Picture 9How to Install Subversion on Mac OS X Picture 9
    Launch Terminal, then create a directory called svnroot in your account directory, as follows: mkdir svnroot
    1. Type: svnadmin create /Users/[your username]/svnroot
      How to Install Subversion on Mac OS X Picture 10How to Install Subversion on Mac OS X Picture 10
    2. That creates your server!
      How to Install Subversion on Mac OS X Picture 11How to Install Subversion on Mac OS X Picture 11
  3. How to Install Subversion on Mac OS X Picture 12How to Install Subversion on Mac OS X Picture 12
    Use the svn server with Terminal. You can checkout in the terminal with this command: svn checkout file:///Users/[your username]/svnroot
    1. For remote access, enable "ssh access" (in System Preferences/Sharing) and checkout with: svn checkout svn+ssh://my.domain.com/Users/[your username]/svnroot
      How to Install Subversion on Mac OS X Picture 13How to Install Subversion on Mac OS X Picture 13
  4. How to Install Subversion on Mac OS X Picture 14How to Install Subversion on Mac OS X Picture 14
    Set up a Subversion client. For example, svnX supports all current versions of Mac OS X from 10.5 to 10.8. You can get it at http://code.google.com.
  5. How to Install Subversion on Mac OS X Picture 15How to Install Subversion on Mac OS X Picture 15
    After the download, start SVNx and you will see two windows named Working Copies and Repositories. Under Repositories, add the URL und Login Data from the SVN Server.
    1. Open the window; if you get an error, check the LogIn.
      How to Install Subversion on Mac OS X Picture 16How to Install Subversion on Mac OS X Picture 16
    2. Switch to the Terminal and type: svn import -m "your Import message" /my/local/project/path /my/remote/svn/repository This command adds all files from the local Project to the SVN Server.
      How to Install Subversion on Mac OS X Picture 17How to Install Subversion on Mac OS X Picture 17
    3. Add the path of your SVN repository (from the SVN server) to the list in the Working Copy window in SVNx.
      How to Install Subversion on Mac OS X Picture 18How to Install Subversion on Mac OS X Picture 18
  6. How to Install Subversion on Mac OS X Picture 19How to Install Subversion on Mac OS X Picture 19
    In SVNx open your working copy. When you're working on this Project, you will see your modifications here.
  7. How to Install Subversion on Mac OS X Picture 20How to Install Subversion on Mac OS X Picture 20
    Test it. Make a small modification on your working copy, then refresh the the Working Copy window.
    1. SVNx displays all files with modifications. Press the Commit button to add it to the SVN Server Repository.
  8. How to Install Subversion on Mac OS X Picture 21How to Install Subversion on Mac OS X Picture 21
    If you prefer to work on the Subversion repository directly from the Finder, consider using either SCPlugin or SVN Scripts for Finder.
4.2 ★ | 20 Vote