Partage via


Commande Aide (Team Foundation Version Control)

Azure DevOps Services | Azure DevOps Server 2022 | Azure DevOps Server 2019

Visual Studio 2019 | Visual Studio 2022

La commande tf help affiche des informations sur la syntaxe des commandes utilitaires de ligne de commande tf.

Prérequis

Syntaxe

tf help <commandname>

Paramètres

Argument

Argument

Description

<commandname>

Spécifie une commande TFVC pour laquelle afficher de l’aide sur la syntaxe.

Notes

  • Si vous ne connaissez pas la commande dont vous avez besoin, entrez :

    • tf vc help pour obtenir la liste des commandes TFVC prises en charge.
    • tf git help pour obtenir la liste des commandes Git prises en charge.
    • tf settings help pour obtenir la liste des commandes de paramètres de serveur prises en charge.
  • Si vous spécifiez le paramètre commandname, la ligne de commande affiche des informations sur les arguments et les options de cette commande. Si le système ne trouve pas de correspondance pour le commandname, il recherche des alias et des noms courts. S’il ne trouve aucune commande, alias ou nom court correspondant, vous obtenez une erreur.

  • L’option /? est un alias pour help. Si vous utilisez l’option /? avec une commande, le système appelle la commande help et affiche des informations de syntaxe pour la commande que vous avez entrée.

Pour plus d’informations sur l’utilisation de l’utilitaire de ligne de commande tf, consultez Utiliser les commandes de contrôle de version Team Foundation.

Exemples

Répertorier les commandes tf vc

L’exemple suivant affiche une liste des commandes de contrôle de version.

>tf vc help
Microsoft (R) TF - Team Foundation Version Control Tool, Version 16.171.31930.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Type tf vc help <command name> for command line description.
Type tf msdn <command name> for full documentation in https://learn.microsoft.com.

Commands:
tf vc add            Adds new files and folders from a local file system
                     location to TFVC.

tf vc branch         Copies an item or set of items, including metadata and
                     version control history, from one location to another on
                     the Azure DevOps server and in the workspace.

tf vc branches       Displays the history of a branch for a specified file
                     or folder.

tf vc changeset      Displays information about a changeset and lets you
                     change the associated attributes, such as comments and
                     check-in notes.

tf vc checkin        Commits pending changes in the current workspace to TFVC.

tf vc checkout       Makes the local file writable and changes its pending
                     Change status to "edit" in the workspace. Edit is an
                     alias for the checkout command.

tf vc certificates   Configures how client authentication certificates are
                     used when connecting to Azure DevOps through a secure connection.

tf vc configure      Enables an administrator to view and change the following
                     configuration settings for a team project in the Source
                     Control Settings dialog box:
                     - Check-out settings
                     - Check-in policies
                     - Check-in notes

tf vc delete         Removes files and folders from TFVC
                     and deletes them from the disk.

tf vc destroy        Destroys, or permanently deletes, version-controlled
                     files from TFVC.

tf vc diff           Compares, and if it is possible, displays differences
                     between two files, files in two folders, or a shelveset
                     and a local or server file.

tf vc dir            Displays all or part of the contents of TFVC.

tf vc folderdiff     Display a visual representation of the differences between
                     files in two server folders, in a server folder and a
                     local folder, or in two local folders.

tf vc get            Retrieves a read-only copy of a file from Azure DevOps
                     Server to the workspace and creates folders on disk to
                     contain it.

tf vc history        Displays the revision history for one or more files and
                     folders.

tf vc info           Displays information about items under version control.

tf vc label          Attaches a label to or removes a label from a version of a
                     file or folder in TFVC.

tf vc labels         Displays the list of labels in TFVC.

tf vc localversions  Displays the version of one or more items in a workspace.

tf vc lock           Locks or unlocks a file or folder to deny or restore the
                     permissions of users to check out an item for edit into
                     a different workspace or to check in pending changes to
                     an item from a different workspace.

tf vc merge          Applies changes from one branch into another.

tf vc merges         Displays detailed information about past merges between
                     the specified source and destination branches.

tf vc msdn           Displays the https://learn.microsoft.com documentation
                     page for the command.

tf vc permission     Modifies the user access control list (ACL) and displays
                     authorization settings for an item under version control.

tf vc property       Displays and pends changes on properties associated with
                     items under version control.

tf vc reconcile      Compares the current state of the workspace on disk with
                     the server's view, either to clean the workspace or to
                     promote unpended local changes.

tf vc rename         Changes the name or the path of a file or folder. You
                     can use the rename command or the alias Move to move a
                     file or folder to a new location.

tf vc resolve        Resolves conflicts between changed items in your
                     workspace and the latest or destination versions of items
                     on the server.

tf vc resolvePath    Resolves a server path to a local path in your workspace.

tf vc rollback       Rolls back the changes in a single or a range of
                     changesets.

tf vc shelve         Stores a set of pending changes, together with pending
                     check-in notes, a comment, and a list of associated work
                     items in Azure DevOps Server without actually checking
                     them into the version control server.

tf vc shelvesets     Displays information about a set of shelved changes.

tf vc status         Displays information about pending changes to items in
                     one or more workspaces.

tf vc undelete       Restores items that were previously deleted.

tf vc undo           Removes pending changes from a workspace.

tf vc unlabel        Removes an item from an existing label in Team Foundation
                     version control.

tf vc unshelve       Restores shelved file revisions, check-in notes, comments,
                     and work item associations to the current workspace or
                     removes an existing shelveset from the server.

tf vc view           Retrieves a specific version of a file to a temporary
                     folder on your computer and displays it.

tf vc workfold       Creates, modifies, or displays information about the
                     mappings between your workspace folders and the TFVC
                     folders.

tf vc workspace      Creates, deletes, displays, or modifies properties and
                     mappings associated with a workspace.

tf vc workspaces     Displays information about workspaces in the system and
                     updates cached information about a user name or computer
                     name change on Azure DevOps Server.

Afficher l’aide pour la commande d’affichage

L’exemple suivant affiche des informations d’aide pour la commande view.

>tf view /help
Microsoft (R) TF - Team Foundation Version Control Tool, Version 16.171.31930.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Retrieves a specific version of a file to a temporary folder on your computer
and displays it.

tf vc view [/collection:TeamProjectCollectionUrl]
           [/console] [/recursive] [/output:localfile]
           [/shelveset:shelvesetname[;owner]] [/noprompt] itemspec
           [/version:versionspec] [/login:username,[password]]

Versionspec:
    Date/Time         D"any .NET Framework-supported format"
                      or any of the date formats of the local machine
    Changeset number  Cnnnnnn
    Label             Llabelname
    Latest version    T
    Workspace         Wworkspacename;workspaceowner

Afficher l’aide pour la commande d’espace de travail

L’exemple suivant affiche des informations sur la syntaxe de la commande workspace.

>tf workspace /help 
Microsoft (R) TF - Team Foundation Version Control Tool, Version 16.171.31930.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Creates, deletes, displays, or modifies properties and mappings associated
with a workspace.

tf vc workspace /new [/noprompt] [/template:workspacename[;workspaceowner]]
                [/computer:computername] [/comment:("comment"|@commentfile)]
                [workspacename[;workspaceowner]]
                [/collection:TeamProjectCollectionUrl]
                [/permission:(Private|PublicLimited|Public)]
                [/location:(local|server)]
                [/filetime:(current|checkin)]
                [/login:username,[password]]

tf vc workspace /delete [/collection:TeamProjectCollectionUrl]
                workspacename[;workspaceowner]
                [/login:username,[password]]

tf vc workspace [/collection:TeamProjectCollectionUrl]
                [/comment:("comment"|@commentfile)]
                [/newname:workspacename] [workspacename[;workspaceowner]]
                [/newowner:ownername] [/computer:computername]
                [/permission:(Private|PublicLimited|Public)]
                [/location:(local|server)]
                [/filetime:(current|checkin)]
                [/login:username,[password]]

L’exemple suivant affiche les mêmes informations sur la syntaxe de la commande workspace.

tf workspace /?