CVS comes preinstalled in Mac OS X.
Here is what I did to setup and use a local cvs repository:
- Make a directory called
- Edit ~./bash_login and add the command
- Run the command
cvsinitin the Terminal
cdto the project directory you want to place under version control
- Suppose your project directory is called
project, type in
cvs import -m "Program" project sample start
- You should get bunch of output followed by the message
No conflicts created by this import
- Let us say you want to checkout the code you have just placed. Simply navigate to a directory where you want to store the checked-out project and type in
cvs checkout project
- If you made changes and want to commit your changes to the repository–say you added a variable called
int x;C file called foo.c, simply type in
cvs commit -m "Added a variable" foo.cafter navigating to the directory where your modified file is
There is much more to CVS, here is an Apple tutorial on the subject.
this seems to be a good, if somewhat dated, tutorial.