Events
17 Mar, 21 - 21 Mar, 10
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
Visual Studio 2019 | Visual Studio 2022
The Team Foundation Version Control add
command adds files and folders to a TFVC repository.
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. |
/lock |
Applies or removes a lock. See Use Team Foundation Version Control commands. |
/noignore |
By default, version control ignores certain types of files, such as .dll files. You can configure which kinds of files to ignore by using a .tfignore file. See Customize which files version control ignores. The rules in a .tfignore file apply to the add command when you specify a wildcard in your itemspec . To override these rules, specify /noignore . |
/noprompt |
Suppresses the display of windows and dialog boxes and redirects output data to the command prompt. See Use Team Foundation Version Control commands. |
/recursive |
Recursively adds items in the specified directory and any subdirectories. |
The following examples assume that c:\code\SiteApp\Main\
maps to $/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.
The following command adds the latest versions of all items in a local workspace, except those items that are ignored:
c:\code\SiteApp\Main\SolutionA\Project1>tf add
The following command adds the latest versions of all items in a local workspace, even items designated as ignored:
c:\code\SiteApp\Main\SolutionA\Project1>tf add /noignore
The following command adds the files program1.cs and program2.cs:
c:\code\SiteApp\Main>tf add program1.cs program2.cs
The following command adds all C# code files (.cs) in the current directory and any subdirectories:
c:\code\SiteApp\Main>tf add *.cs /recursive
add
command are queued as pending changes and don't take effect on the server until you check them in. See Checkin command.Events
17 Mar, 21 - 21 Mar, 10
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register now