Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Add New File or a Directory to a Project in the Repository."— 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 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 directories are 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 Using cvs 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/design added to the repository Directory /var/lib/cvs/wizzard/doc/plan 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/Analysis.rtf' for addition cvs server: scheduling file `design/Specification.rtf' for addition cvs server: scheduling file `plan/Schedule.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 cvs server: use 'cvs commit' to add these files permanently


Download ppt "Add New File or a Directory to a Project in the Repository."

Similar presentations


Ads by Google