Dela via


Working with Labels

You can use labels to selectively attach a set of otherwise unrelated file and folder versions in Team Foundation version control so that you can later retrieve them for development or build purposes. You can use a label with operations such as branching, merging, diffing, and getting specific versions of files and folders.

A common type of label is a milestone label such as "M1," "Beta2," or "Release Candidate 0."

Labels Are Not Versioned Objects

Unlike files, labels are not versioned objects. This means that Team Foundation maintains no history of files that are or were previously marked by a label. Furthermore, labels are not pending changes that must be committed with the Checkin command. When you issue the Label command, the appropriate updates are immediately reflected in the Team Foundation version control server.

Labels Apply to Versions, Not Files

Labels are version-specific in that you can only apply a label to one version of a file or folder. Files and versions can have multiple labels associated with them.

Labels Have Scope

Labels are created by using a scope that qualifies the name of the label. It does not restrict the items to which that label can be applied. You can use the same name for another label in another section of Team Foundation version control. The label scope is a path within Team Foundation version control underneath which no other labels with the same name can be created.

Labels are scoped to the root folder of the team project in which they are created. Labels created from the command line are scoped to the longest common path shared by the items specified in the label command. For more information, see Label Command (Team Foundation Version Control).

See Also

Other Resources

Working with Version Control Files and Folders