cvs [add aborted]: there is no version here; do 'cvs checkout' first
2005-02-03

Learning CVS can be counter-intuitive at times, but here's how one little problem can be solved.

When i'm accessing a remote CVS repository, I often use the syntax:
cvs -d username@192.168.2.1/var/cvs checkout path/to/files/
cvs -d username@192.168.2.1/var/cvs commit path/to/files/

One would think the add command would function in a similar manner...
cvs -d username@192.168.2.1/var/cvs add path/to/files/new_file.pl
but it gives the following error:
cvs [add aborted]: there is no version here; do 'cvs checkout' first

However, the checkout command is different from the rest, in that it sets up your repository initially; other commands must be run from a repository context:
cd path/to/files/
cvs -d username@192.168.2.1/var/cvs add new_file.pl
cvs -d username@192.168.2.1/var/cvs commit

You must run cvs checkout first, as the error message hints, prior to performing an addition -- but chances are that you just need to enter the directory where your files live.