简体   繁体   English

我们如何使用TF命令将包含文件和子文件的新文件夹检入TFS?

[英]how can we checkIn a new folder with files and subfiles into TFS using TF commands?

我想使用Power Shell脚本将包含文件的本地文件夹映射并签入到TFS中。

The sequence would be: 顺序为:

tf workspace /new (Create a new workspace) tf workspace /new (创建新工作区)

tf workfold /map and tf workfold /cloak (Map server folders to local folders) tf workfold /map文件夹tf workfold /maptf workfold /cloak文件夹tf workfold /cloak (将服务器文件夹映射到本地文件夹)

tf get (optional to get the contents of the server folder) tf get (可选,以获取服务器文件夹的内容)

tf add (Add the files/folders to the staging area) tf add (将文件/文件夹添加到暂存区)

tf checkin (check in the changes) tf checkintf checkin更改)

tf workspace /delete (optional to remove the (temporary) workspace) tf workspace /delete (删除(临时)工作区的可选)

If you need to merge/resolve conflicts, you can use tf resolve . 如果您需要合并/解决冲突,则可以使用tf resolve

TFS Powershell commandlets are available with Team Foundation Server Power Tools Team Foundation Server Power Tools提供了TFS Powershell Commandlet

These are available for all versions of TFS. 这些可用于所有版本的TFS。 Remember to install the PowerShell cmdlet options. 记住要安装PowerShell cmdlet选项。

Once install, you would simply have to add Microsoft.TeamFoundation.Powershell snapin in your script 安装后,只需在脚本中添加Microsoft.TeamFoundation.Powershell管理单元即可。

Add-PSSnapin Microsoft.TeamFoundation.PowerShell

You can then use the out of the box cmdslets such as Add-TfsPendingChange -Edit and New-TfsChangeset to add items and check-in 然后,您可以使用开箱即用的cmdslet(例如Add-TfsPendingChange -Edit和New-TfsChangeset)添加项目并签入

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM