One minute's guide on using CVS to manage your files
The following describes how to start using CVS to manage your files.
- Create a directory that is to be managed by CVS. In fact, this is the repository that stores all the versions of your files and CVS' own management files.
mkdir $HOME/cvsroot
Add the following line to your
.bashrc
file
export CVSROOT=$HOME/cvsroot
and then source your .bashrc file. This is probably the only CVS variable that matters.
- Run
cvs init
to initialize the repository
$HOME/cvsroot.
- Create any directory where you want to store your files. Suppose you have an
existing
$HOME/writings/
directory that stores all your files, then you can do
the following:
# Create the directory in your CVS repository directly
mkdir $HOME/cvsroot/writings
# Go to your home directory and do a checkout
# Your existing files will stay there
cd $HOME
cvs co writings
- Now you can go to your
$HOME/writings
directory and add all the files
that you want to manage with CVS
cd $HOME/writings
# Add all the files that you want to manage with CVS
cvs add *.txt
- Once you are done, you can just run
cvs commit
to store all your files into your CVS repository. Add one or two lines of
comment if needed.
- From now on you can just continue working on your files. Once you feel
the need to save these files, just run
cvs commit
again.