Next: , Previous: Version Versus Revision, Up: A Day With CVS

Making A Change

The project as it stands doesn't do much. Here are the contents of hello.c:

     floss$ cat hello.c
     #include <stdio.h>
     main ()
        printf ("Hello, world!\n");

Let's make the first change to the project since importing it; we'll add the line

     printf ("Goodbye, world!\n");

right after the Hello, world!. Invoke your favorite editor and make the change:

     floss$ emacs hello.c

This was a fairly simple change, one where you're not likely to forget what you did. But in a larger, more complex project, it's quite possible you may edit a file, be interrupted by something else, and return several days later and be unable to remember exactly what you did, or even to remember if you changed anything at all. Which brings us to our first "CVS Saves Your Life" situation: comparing your working copy against the repository.

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

copyright  ©  August 06 2020 sean dreilinger url: