1 / 6

Add New File or a Directory to a Project in the Repository

Add New File or a Directory to a Project in the Repository. To add a file to a project in the repository, first create the file in your sandbox. Consider your project's structure and place the file in the correct directory.

drea
Download Presentation

Add New File or a Directory to a Project in the Repository

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Add New File or a Directory to a Project in the Repository

  2. To add a file to a project in the repository, first create the file in your sandbox. • Consider your project's structure and place the file in the correct directory. • Then, issue the following command from the sandbox directory containing the file: cvs add filename

  3. This command marks the new file for inclusion in the repository. • Directories are added with the same command. Files within a directory can't be added until the directory itself is added. • A file is only marked for addition when you run cvs add; it is actually added to the repository when the next cvs commit is run. • A directory is added to the repository immediately.

  4. Example • This example shows a file being created and added to the repository. $ touch file3 $ cvs add file3 cvs add: scheduling file `file3' for addition cvs add: use 'cvs commit' to add this file permanently $ cvs commit

  5. The Attic and CVS directoriesare special directories that CVS uses for its own purposes. Do not make a file or directory with these names. • You can use cvs remove to remove a file that has been added but not committed. This removes the marking in the CVS subdirectory and doesn't record the aborted addition in the repository's history. • Similarly, you can use cvs add to abort a file removal; it will resurrect the file without recording the aborted removal.

  6. Another example Usingcvs add $ cvs add design plan design/*.rtf plan/*.rtf • Directory /var/lib/cvs/wizzard/doc/design added to the repository • Directory /var/lib/cvs/wizzard/doc/plan added to the repository • cvs server: scheduling file `design/Analysis.rtf' for addition • cvs server: scheduling file `design/Specification.rtf' for addition cvs server: scheduling file `plan/Schedule.rtf' for addition • cvs server: use 'cvs commit' to add these files permanently

More Related