If you have worked with SVN Repositories on Windows and you are migrating to a Macintosh, you might be wondering if there is any free SVN Server available for mac such as Visual SVN?
The answer is, Yes. There is one that ships right in the box with Mac OSX. It is included both in Snow Leopard and Lion. The trick is though it does not have any GUI. You have to use command line to create and manage your repository. That may not be the best thing in the world. But apart from that is is very powerful. You can check out things from a local system, remote server, HTTPS server and works very smooth. I have had many troubles with SVN Servers on Windows but not on Mac.
A quicker tutorial on how to use SVN on mac can be found here
I will try to guide you brief how to setup your repository.
1. Type “Terminal” in spot light (that is search in top right corner). You will see Terminal in the result. Click on it to start Terminal.
2. Where you want to create the repository? It is best to create a separate folder for your repository. Lets create one now
Note that we create a f older first then we moved into that folder.
3. Next create repository
svnadmin create .
This says, create SVN Repository in the current folder. Dot is for current folder. We could have combined the first two steps into one by issuing this command without creating any directory
svnadmin create MyFiles
This would create MyFiles Repository and will store it in MyFiles folder.
4. The next step would be to import files
svn import destination-folder file:///full-path-to-the-repository -m "Initial Import"
The first argument to svn import is
- Destination Folder
- Full path to your repository folder
The last argument is just a comment. It is best to put meaningful comments.
This is all your need to setup a repository on MacOSX.
The next step would be, you want to use this repository. So you have check out. Use the following command to check out your files into any folder you want
svn checkout file:///full-path-to-the-repository destination-folder
svn checkout . ../workinCopy (example)
Note that I used the . (dot) to indicate checkout everything in the current folder. The second is path to the folder where the files will be copied.
The next thing is, you want to work in the working copy. Basically you will need SVN client where you can see your work, what have you changed, what needs to be reverted, see difference between working copy and repository etc. There are a couple of good SVN Clients for although they are not free