Next: , Previous: CVS And Implied Arguments, Up: A Day With CVS


The commit command sends modifications to the repository. If you don't name any files, a commit will send all changes to the repository; otherwise, you can pass the names of one or more files to be committed (other files would be ignored, in that case).

Here, we commit one file by name and two by inference:

     floss$ cvs commit -m "print goodbye too" hello.c
     Checking in hello.c;
     /usr/local/cvs/myproj/hello.c,v  <--  hello.c
     new revision: 1.2; previous revision: 1.1
     floss$ cvs commit -m "filled out C code"
     cvs commit: Examining .
     cvs commit: Examining a-subdir
     cvs commit: Examining a-subdir/subsubdir
     cvs commit: Examining b-subdir
     Checking in a-subdir/subsubdir/fish.c;
     /usr/local/cvs/myproj/a-subdir/subsubdir/fish.c,v  <--  fish.c
     new revision: 1.2; previous revision: 1.1
     Checking in b-subdir/random.c;
     /usr/local/cvs/myproj/b-subdir/random.c,v  <--  random.c
     new revision: 1.2; previous revision: 1.1

Take a moment to read over the output carefully. Most of what it says is pretty self-explanatory. One thing you may notice is that revision numbers have been incremented (as expected), but the original revisions are listed as 1.1 instead of as we saw in the Entries file earlier.

There is an explanation for this discrepancy, but it's not very important. It concerns a special meaning that CVS attaches to revision For most purposes, we can just say that files receive a revision number of 1.1 when imported, but the number is displayed – for reasons known only to CVS – as in the Entries file, until the first commit.

Karl Fogel wrote this book. Buy a printed copy via his homepage at

copyright  ©  January 18 2019 sean dreilinger url: