What you need is a version control system. CVS is one of these and will be the most highly recommended by the unix croud. CVS is open source and, therefore, free.
Microsoft Visual Source Safe is another version control system but it's real easy to put together a huge list of reasons not to use it.
cvshome.org for info on cvs.