Using SVN Server on Mac LION OSX

On Windows we are familiar with Visual SVN (Server) and Tortoise SVN (Client), What are my options on Max OSX Lion/Tiger/Mountain Lion? Well Mac OSX Lion comes with SVN Server built in. That means you do not need to install anything for SVN Server. You can create repositories and commit changes right out of the box.

Svn Server Tutorial on Mac Lion

Start Terminal. Go the the directory where you want to create repository. Lets say we can to create Repository in Sites folder. We would issue the following commands

cd Sites
mkdir Repositories
cd Repositories
svnadmin create MyProjectRepo

Now the second step is to import the files for the first time. Issue the following command

First time Import files

svn import . ../MyProject
file:///Users/myUserName/Sites/Repositories/MyProjectRepo -m "Initial import"

Check out the Repository

Checkout is important step so that you must do. Basically you are creation a working copy when you checkout. You can check out as many copies as you want. But obviously you should check out only once on a PC unless you want to do some experiments

svn checkout file:///Users/akhammad/Sites/Repository/MyProjectRepo ../test-copy
(assuming you are inside Sites/Repositories folder)

svnadmin create /Repo_Master/Sketch_svn

The create command creates only the last directory in the specified path; in this command, for example, the /Repo_Master directory must already exist.

In Step 4, you import your project from the temporary structure into the new repository and place it under Subversion source control. The following command accomplishes this:

svn import /Users/myUserName/Projects/Sketch_tmp
file:///Users/myUserName/Repositories/Sketch_svn -m “Initial import”

This entry was posted in Software Development. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s