How to Start Using CVS Robert Keller 16 March 2001 1. If you are to work with an EXISTING CVS repository, set your environment variable CVSROOT to that repository in your .cshrc and source your .cshrc. 2. If you are to create a NEW CVS repository, create a directory for it and apply step 1 above, then do: cvs init 3. Connect to an existing project directory (first mkdir a new directory if there is no existing project): cd project 4. Import the project into a CVS "module": cvs import where is the long-term name of the project is some identifying tag, such as your initials is a message, such as "initial version" 5. Connect to the parent directory of the project directory: cd .. 6. Remove the project directory (you'll be able get it back, but if you're worried, make a backup copy first). /bin/rm -rf project 7. In any directory you desire, recreate the project directory through CVS: cvs co project 8. Connect to the project directory: cd project 9. Create any files you wish, using any method 10. Tell CVS about any files you wish to keep: cvs add Don't add files that are generated from other sources, such as .o files and executables. 11. Remove any files you don't wish to keep, then tell CVS: cvs rm 12. To commit changes to files, additions of files, and removals of files: cvs commit 13. To get any changes committed by your self or others: cvs update If there are conflicts to be resolved, you will be told which files have them. 14. To get info: cvs log Steps starting with 7. can be repeated by any user in any directory. This gives the user a local copy of the project. The project can be modified concurrently by all team members.