gpt4 book ai didi

powershell - 通过 PowerShell 在 TFS 上 checkout / checkin 文件

转载 作者:行者123 更新时间:2023-12-03 13:18:28 24 4
gpt4 key购买 nike

我想使用 PowerShell 自动 check out 和检入已编辑的 .csproj 文件到 TFS。我只需要将单个文件更改为挂起并 checkin 。

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

最佳答案

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

#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

关于powershell - 通过 PowerShell 在 TFS 上 checkout / checkin 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4470871/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com