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

StackOverflow https://stackoverflow.com/questions/23359942

  •  11-07-2023
  •  | 
  •  

سؤال

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