Add Command
Adds files and folders to version control.
Tip
|
|---|
|
|
Requirements: See Team Foundation Server Permissions.
tf add itemspec [/lock:(none|checkin|checkout)] [/encoding:filetype] [/noprompt] [/recursive] [/noignore] [/login:username,[password]]
|
Parameter |
Description |
|---|---|
|
/encoding: filetype |
Ignore this parameter. |
|
itemspec |
Specifies the scope of the items to add. You can specify more than one itemspec argument. For syntax, see Team Foundation Version Control Command Reference. |
|
/lock |
Applies or removes a lock. See Team Foundation Version Control Command Reference. |
|
/login:username,[password] |
Specifies the user account to run the command. See Team Foundation Version Control Command Reference. |
|
/noignore |
By default certain types of files (for example, .dll files) are ignored by version control. The rules in a .tfignore files apply to the Add command when you specify a wildcard in your itemspec. To override the application of the rules in this case, specify /noignore. You can configure which kinds of files are ignored using a .tfignore file (see Add Files: .tfignore file). |
|
/noprompt |
Suppresses the display of windows and dialog boxes and redirects output data to the command prompt. See Team Foundation Version Control Command Reference. |
|
/recursive |
Recursively adds items in the specified directory and any subdirectories. |
In all the following examples, assume that $/SiteApp/Main/ is mapped to c:\code\SiteApp\Main\ in the workspace.
New files in a local workspace are automatically detected. You can promote these newly detected files to your pending changes.
c:\code\SiteApp\Main\SolutionA\Project1>tf add
Adds the latest versions of all items (except those that are ignored) in a local workspace.
c:\code\SiteApp\Main\SolutionA\Project1>tf add /noignore
Adds the latest versions of all items in a local workspace.
-
Add Files to the Server Use Visual Studio to add files to the server.
-
The results of this command are queued as pending changes (see Status Command) and do not take effect on the server until you check in (see Checkin Command). -
If you need to set aside changes (and perhaps also want to clean your workspace for another task), use the Shelve Command.
Tip