Udostępnij za pośrednictwem


Unlabel command (Team Foundation Version Control)

TFS 2017 | TFS 2015 | TFS 2013

Visual Studio 2019 | Visual Studio 2017 | Visual Studio 2015 | Visual Studio 2013

The unlabel command removes an item from an existing label in the server for Team Foundation version control.

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:TeamProjectCollectionUrl] [/recursive] [/login:username, [password]] labelname itemspec

Parameters

Argument

Argument

Description

TeamProjectCollectionUrl

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

labelname

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

itemspec

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

Note

You can specify more than one itemspec argument.

username

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

Option

Option Description
/recursive Unlabels all items in the particular directory and all the subdirectories that match the itemspec.
/collection Specifies the project collection.
/login Specifies the user name 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 Team Foundation version control 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 Team Foundation version control server, that label is deleted. You can also delete a label using the command tf label /delete. To learn more about the existing labels in the system, see Labels Command.

For more information on how to find 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 http://myserver:8080/tfs/DefaultCollection.

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