Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

1.3.4. Adding and Deleting Files


Adding a File

To add an existing file to a CVS repository and put it under revision control, change to the directory with its working copy and run the following command:
cvs add file
This schedules the file for addition to the CVS repository. To proceed and actually add the file to the repository, run the cvs commit command as described in Section 1.3.6, “Committing Changes”.

Example 1.18. Adding a file to a CVS repository

Imagine that the directory with your working copy of a CVS repository has the following contents:
project]$ ls
AUTHORS  ChangeLog  CVS  doc  INSTALL  LICENSE  Makefile  README  src  TODO
With the exception of ChangeLog, all files and directories within this directory are already under revision control. To schedule this file for addition to the CVS repository, type:
project]$ cvs add ChangeLog
cvs add: scheduling file `ChangeLog' for addition
cvs add: use 'cvs commit' to add this file permanently

Deleting a File

To remove a file from a CVS repository, change to the directory with its working copy and delete it locally:
rm file
Then schedule this file for removal by using the following command:
cvs remove file
To proceed and actually remove the file from the repository, run the cvs commit command as described in Section 1.3.6, “Committing Changes”.

Example 1.19. Removing a file from a CVS repository

Imagine that the directory with your working copy of a CVS repository has the following contents:
project]$ ls
AUTHORS  ChangeLog  CVS  doc  INSTALL  LICENSE  Makefile  README  src  TODO
All files in this directory are under revision control. To schedule the TODO file for removal from the CVS repository, type:
project]$ rm TODO
project]$ cvs remove TODO
cvs remove: scheduling `TODO' for removal
cvs remove: use 'cvs commit' to remove this file permanently
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.