Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用TFSBuild.exe启动生成时,如何指定Git提交id(哈希)?_Git_Tfs_Tfsbuild - Fatal编程技术网

使用TFSBuild.exe启动生成时,如何指定Git提交id(哈希)?

使用TFSBuild.exe启动生成时,如何指定Git提交id(哈希)?,git,tfs,tfsbuild,Git,Tfs,Tfsbuild,TFSBuild.exe是从命令行启动TFS build的方法。TFSBuild.exe未指明如何指定Git提交Id(提交的哈希值) TFSBuild.exe讨论了/getOption:Custom选项,使用该选项时,可以通过使用/customGetVersion选项指定更改集或标签标识符来指定生成所基于的更改集或标签。对于标签,以“L”开头。对于变更集,以“C”开头 但是,似乎没有任何文档说明如何指定Git提交id。您可以使用“标签”语法指定Git提交id,但在提交id之前添加一个“G:ref

TFSBuild.exe是从命令行启动TFS build的方法。TFSBuild.exe未指明如何指定Git提交Id(提交的哈希值)

TFSBuild.exe讨论了/getOption:Custom选项,使用该选项时,可以通过使用/customGetVersion选项指定更改集或标签标识符来指定生成所基于的更改集或标签。对于标签,以“L”开头。对于变更集,以“C”开头


但是,似乎没有任何文档说明如何指定Git提交id。

您可以使用“标签”语法指定Git提交id,但在提交id之前添加一个“G:ref:”。如:/customGetVersion:LG:ref:

完整语法:

TFSBuild start teamProjectCollectionUrl teamProject definitionName /queue /getOption:Custom /customGetVersion:LG:ref:<hash>
TFSBuild start http://gitsourceserver:8080/tfs/MyCompany MyTeamProject MyBuildDefinition /queue /getOption:Custom /customGetVersion:LG:ref:0c9cc3ce