问题
Running tf scorch
behaves as I'd expect. However, running tf scorch /?
says the syntax for this command should be tf vc scorch
. Looking elsewhere on SO I've found this latter syntax used: What does the command tf vc scorch do?.
Does the vc
argument have any impact / is there any good reason to include or exclude it?
回答1:
Just run tf.exe /?
and it will tell you:
Microsoft (R) TF - Team Foundation Version Control Tool, Version 15.127.27130.1
Copyright (c) Microsoft Corporation. All rights reserved.
Type tf vc help for a list of supported Version Control commands.
Type tf git help for a list of supported Git commands.
Type tf settings help for a list of supported server settings commands.
So there are a number of TFVC commands, a number of Git commands and a couple of settings commands. Each of these categories already share the help
, permission
and view
command, these require disambiguation.
By including vc
or git
you're explicitly telling the command line which subcommand you want to use. For backwards compatibility, some commands are automatically routed to vc
without specifying the top level differentiator.
来源:https://stackoverflow.com/questions/47890637/what-does-the-argument-vc-add-to-the-command-tf