/contrib/cvs/contrib/intro.doc

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 112 lines · 79 code · 33 blank · 0 comment · 0 complexity · 71cd5282a0802b2e1babf3162c18a634 MD5 · raw file

  1. Date: Tue, 16 Jun 1992 17:05:23 +0200
  2. From: Steven.Pemberton@cwi.nl
  3. Message-Id: <9206161505.AA06927.steven@sijs.cwi.nl>
  4. To: berliner@Sun.COM
  5. Subject: cvs
  6. INTRODUCTION TO USING CVS
  7. CVS is a system that lets groups of people work simultaneously on
  8. groups of files (for instance program sources).
  9. It works by holding a central 'repository' of the most recent version
  10. of the files. You may at any time create a personal copy of these
  11. files; if at a later date newer versions of the files are put in the
  12. repository, you can 'update' your copy.
  13. You may edit your copy of the files freely. If new versions of the
  14. files have been put in the repository in the meantime, doing an update
  15. merges the changes in the central copy into your copy.
  16. (It can be that when you do an update, the changes in the
  17. central copy clash with changes you have made in your own
  18. copy. In this case cvs warns you, and you have to resolve the
  19. clash in your copy.)
  20. When you are satisfied with the changes you have made in your copy of
  21. the files, you can 'commit' them into the central repository.
  22. (When you do a commit, if you haven't updated to the most
  23. recent version of the files, cvs tells you this; then you have
  24. to first update, resolve any possible clashes, and then redo
  25. the commit.)
  26. USING CVS
  27. Suppose that a number of repositories have been stored in
  28. /usr/src/cvs. Whenever you use cvs, the environment variable
  29. CVSROOT must be set to this (for some reason):
  30. CVSROOT=/usr/src/cvs
  31. export CVSROOT
  32. TO CREATE A PERSONAL COPY OF A REPOSITORY
  33. Suppose you want a copy of the files in repository 'views' to be
  34. created in your directory src. Go to the place where you want your
  35. copy of the directory, and do a 'checkout' of the directory you
  36. want:
  37. cd $HOME/src
  38. cvs checkout views
  39. This creates a directory called (in this case) 'views' in the src
  40. directory, containing a copy of the files, which you may now work
  41. on to your heart's content.
  42. TO UPDATE YOUR COPY
  43. Use the command 'cvs update'.
  44. This will update your copy with any changes from the central
  45. repository, telling you which files have been updated (their names
  46. are displayed with a U before them), and which have been modified
  47. by you and not yet committed (preceded by an M). You will be
  48. warned of any files that contain clashes, the clashes will be
  49. marked in the file surrounded by lines of the form <<<< and >>>>.
  50. TO COMMIT YOUR CHANGES
  51. Use the command 'cvs commit'.
  52. You will be put in an editor to make a message that describes the
  53. changes that you have made (for future reference). Your changes
  54. will then be added to the central copy.
  55. ADDING AND REMOVING FILES
  56. It can be that the changes you want to make involve a completely
  57. new file, or removing an existing one. The commands to use here
  58. are:
  59. cvs add <filename>
  60. cvs remove <filename>
  61. You still have to do a commit after these commands. You may make
  62. any number of new files in your copy of the repository, but they
  63. will not be committed to the central copy unless you do a 'cvs add'.
  64. OTHER USEFUL COMMANDS AND HINTS
  65. To see the commit messages for files, and who made them, use:
  66. cvs log [filenames]
  67. To see the differences between your version and the central version:
  68. cvs diff [filenames]
  69. To give a file a new name, rename it and do an add and a remove.
  70. To lose your changes and go back to the version from the
  71. repository, delete the file and do an update.
  72. After an update where there have been clashes, your original
  73. version of the file is saved as .#file.version.
  74. All the cvs commands mentioned accept a flag '-n', that doesn't do
  75. the action, but lets you see what would happen. For instance, you
  76. can use 'cvs -n update' to see which files would be updated.
  77. MORE INFORMATION
  78. This is necessarily a very brief introduction. See the manual page
  79. (man cvs) for full details.