문제

i want to map and checkIn a local folder which contains files into TFS using power shell scripting.

도움이 되었습니까?

해결책

The sequence would be:

tf workspace /new (Create a new workspace)

tf workfold /map and tf workfold /cloak (Map server folders to local folders)

tf get (optional to get the contents of the server folder)

tf add (Add the files/folders to the staging area)

tf checkin (check in the changes)

tf workspace /delete (optional to remove the (temporary) workspace)

If you need to merge/resolve conflicts, you can use tf resolve.

다른 팁

TFS Powershell commandlets are available with Team Foundation Server Power Tools

These are available for all versions of TFS. Remember to install the PowerShell cmdlet options.

Once install, you would simply have to add Microsoft.TeamFoundation.Powershell snapin in your script

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top