w3reference home
CVS Tutorial


Bookmark and Share

Add Command

The add command adds new files and directories to the CVS repository. The syntax of the add command for a directory is:
cvs add directory
Suppose, you want to create a directory named, test, the command for the same will be:
cvs add test
The syntax to add a file in the repository is:
cvs add filename
cvs commit filename
The commit command has to be used to actually create a file in the repository. The add command only schedules the file for addition. Suppose, for example, you want to add a new file, new.txt to the CVS repository, use the following command:
cvs add new.txt
cvs commit new.txt
Options of the add command
1) -b bug
This option marks the newly added file with bug identifier.
2) -k kflag
It is a sticky option that processes the keywords according to the kflag.
3) -m msg
Adds a new file in the repository with a message, msg. msg is like a comment or some additional information about the file. By using -m option, editor need not be invoked.
4) -r branch
Adds the new file onto a different branch. By default, the branch is the same as the directory.
5) -kb filename
The option -kb is used to add a binary file. For example, to add a binary file, new.gif, the code is:
cvs add –kb new.gif
cvs commit –m "New binary file" new.gif
A new file named new.gif has been added to the repository with the message New binary file.

Some food for thought
What is the difference between commit and add command?

Code Validator
Learn FTP
Color finder
Link Checker
Free web designs
Coming soon!
Interview Questions...
'w3reference : Learn by examples ... Advanced to beginner's tutorials ...'
Ajax: AJAX tutorial1 | Apache: Apache HTTP Server | Restarting Apache | CSS: CSS Border | CSS Syntax | CSS Selector | CSS Comment | CVS: CVS Release | CVS Login | CVS Logout | CVS Annotate | Databases: Rolap Tutorial | OLAP Tutorial | OLTP Tutorial | data warehousing | Expect: HTML: html | Linux: Dot (.) conf files | Linux Mount Point | Linux Filesystem | SSH Tutorial | Linux Commands: cal | cat | cfdisk | chroot | MySQL: MySQL Commands | PHP: PHP Basics | PHP Variables | PHP Output (echo/print) | PHP String Concat | PL/SQL: PL/SQL Data Types | PL/SQL Control Structures | PL/SQL File Extensions | PL/SQL DBMS_OUTPUT package | Python: My first Python program | Shell: Starting Bash | Bash Redirection | Bash Pipes | Bash Variables | SQL: SQL Transactions | SQL Constraints | SQL Drop | SQL Union & Union All | SVN: svn architecture | SVN Repository | SVN Import | SVN Checkout | Tech: soap | Web Designing: Web Hosting | HTML/XHTML/CSS code validator | Learn FTP | Search Engine Optimization Tips | www: XML: XML vs HTML | XML Syntax | XML Tags, Elements and Attributes | XML Namespaces |
Sitemap | Disclaim | Privacy Policy | Contact | ©2007-2009 w3reference.com All Rights Reserved.