通过 PowerShell 在 TFS 上签出/签入文件

2024-04-24

我想使用 PowerShell 自动将编辑后的 ​​.csproj 文件签出和签入到 TFS。我只需要将单个文件更改为待处理并签入这些文件。

有谁知道如何做到这一点?


我和你有同样的痛苦,最后找到了正确的方法。 干得好。

#Load the TFS powershell
Add-PSSnapin Microsoft.TeamFoundation.PowerShell
# the filePath should be in the format like C:\MyFodler\MyFile.txt
Add-TfsPendingChange -Edit -Item $filepath -Verbose -ErrorAction SilentlyContinue -wa 0
# Check in the file after changes.
New-TfsChangeset -Item $filepath -Verbose -Comment "Comment Here" -Override true
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

通过 PowerShell 在 TFS 上签出/签入文件 的相关文章

随机推荐