Compartir vía


Unlabel command (Team Foundation Version Control)

TFS 2018

Visual Studio 2019 | Visual Studio 2022

The Team Foundation Version Control (TFVC) unlabel command removes an item from an existing label in the version control server.

Prerequisites

To use the unlabel command, you must either own the label, or have the Administer labels permission set to Allow. For more information, see Default TFVC permissions.

Syntax

tf unlabel [/collection:<team-project-collection-url>] [/recursive] [/login:<username>, [<password>]] <label-name> <item-specification>

Parameters

The following sections describe arguments and options of the unlabel command.

Arguments

Argument

Description

<team-project-collection-url>

Specifies the URL of the project collection that contains the item that you want to remove from an existing label, for example, https://myserver:8080/tfs/DefaultCollection.

<label-name>

Specifies the name of the label to remove from the specified items.

<item-specification>

Identifies the file or folder to remove the specified label from. For more information about how TFVC parses item specifications to determine which items are within scope, see Use Team Foundation version control commands.

Note

You can specify more than one item specification argument.

<username>

Provides a value to the /login option. You can specify this value as either DOMAIN\<username> or <username>.

<password>

Provides a value to the /login option.

Options

Option Description
/recursive Removes the specified label from all items in the particular directory and all subdirectories that match the item specification.
/collection Specifies the project collection.
/login Specifies the username and password to authenticate the user with Azure DevOps.

Remarks

The unlabel command of the tf command-line utility removes an item from an existing label in the Azure DevOps server. For an introduction to labels, see Use labels to take a snapshot of your files. For information about how to assign a label to a set of files and folders, see Label command (Team Foundation Version Control).

If you remove all items from a label in the Azure DevOps server, that label is deleted. You can also delete a label by using the tf label /delete command. To learn more about the existing labels in the system, see Labels command.

For more information about how to use the tf command-line utility, see Use Team Foundation version control commands.

Examples

The following example removes the goodbuild label from 314.cs:

c:\projects>tf unlabel goodbuild $/src/314.cs

The following example removes the Beta1 label from all files and folders in the collection at https://myserver:8080/tfs/DefaultCollection:

c:\projects>tf unlabel Beta1 $/ /collection:https://myserver:8080/tfs/DefaultCollection /recursive