Hack up your own personal CVS repository
Very quick and very simple guide setting up a CVS repository (stolen ;-) from
Thomas Lotterer: thl@lotterer.net)Very quick: only two commands to setup repository and module
Very simple: personal CVS only, no client/server, access control etc.
Very incomplete: but usefulBefore you start, backup existing data! Just in case something goes wrong
**** SETUP ****
o Create directory for my repository and initialize CVS internal
information.$ cvs -d $HOME/myrepository init
o Create directory for my module (= project), no initialization
required.$ mkdir $HOME/myrepository/mymodule
That's it.
**** USE CVS ****
Now assume that $HOME/mymodule already exists and contains my
precious data from the time i had no CVS.o Check out module.
$ cd $HOME/
$ cvs -d $HOME/myrepository checkout mymodule
$ cd mymoduleFrom now on we do not need to care about the path to the repository
or the module anymore. Files which existed prior to checkout will
not be touched (of course you did the backup anyway) and are listed
with a '?' prefix which means CVS sees them but does not know about
them.o Update files, check their status (repeat to see the '?' prefix), and
merge information from the repository into the local files (cannot
happen in this example, as the module is still empty). Do this anytime
you want up to date files.$ cvs up # add -n to not update/merge, just see status
o Add files to the module in the repository.
$ cvs add *
o Now CVS sees the files and knows they are new, indicated by 'A'
prefix. Do this any time new files have to be added.$ cvs up
o Commit changes (added files are changes from nothing to something)
$ cvs commit -m 'message for myself to remember what i did'
o Tag current version with a name for easier reference
$ cvs tag MYFIRSTTAG *
o See the history of a myfile including my useful messages
$ cvs log myfile
o See what i changed compared to the repository (nothing unless
something was changed)$ cvs diff myfile
o Status (+update, remember from above)
$ cvs up
o Remove myfile (of course, previously commited versions can be
recovered)$ rm myfile
$ cvs rm myfile
$ cvs commit myfileo Recover a specific version (as seen in log)
$ cvs up -r1.1
or
$ cvs up -rMYFIRSTTAG
or
$ cvs up -A #revert to use most current version (initial default)There is soooooo much more to say but knowing the most basic
"add|up|tag|log|rm" CVS commands is sufficent to start.

