0

I use TFVC as a source control system and frequently have to both update existing and add new items in a folder (with many sub and subsub folders). Because this is quite tedious click work I'd like to do this in bulk. But unlike Git, TFVC or more precisely tf.exe does not pick up newly added files to a managed folder. So I basicly need to go through each folder in Source Ccontrol Explorer and click "Add Items to Folder...", then I can add newly added files in bulk but only for that particular folder.

I know that these files are automatically detected but the annoyance is that they still need to be added manually. This can be automated for instance using tf.exe in a PS script, but I was wondering if anybody knows if there's an off the shelf solution, a tf.exe setting that enables that automatic picking up of new files or maybe a vsix extension for Visual Studio for enforcing this Git-like behaviour machine-wide or per workspace?

At least I couldn't find anything of that sort...

Thanks anyway

DanDan
  • 1,038
  • 4
  • 15
  • 28
  • of course it would be best to take the .tfignore file(s) into account just like Git does with .gitignore, tf.exe already does that when detecting added files, the excluded files don't appear as "detected" in that sense – DanDan Oct 09 '18 at 12:02
  • What command line are you calling from tf.exe? are you using the `tf vc add` command? i.e. `tf vc add "c:\path to my stuff\" /recursive ` – James Reed Oct 09 '18 at 13:23
  • Yes I could use exactly that command, I could wrap this into some kind of automation. This would work, but I thought there might already be a solution – DanDan Oct 09 '18 at 13:33
  • 1
    Well it sounds like you're already using local workspaces (as you mention tfignore files) this is about as good as TFVC gets in terms of auto detecting stuff. If you want Git like behavior, use Git! ;-) TFS / VSTS support Git repos or you could use [git-tfs](https://github.com/git-tfs/git-tfs) and run git locally to commit to TFVC – James Reed Oct 09 '18 at 13:37
  • Yes, I knew I would trigger this recommendation with that kind of question. I use Git for most things, but you cannot always choose – DanDan Oct 09 '18 at 13:43
  • 1
    Git-tfs is transparent, no one would know! Well whoever administers your desktop might but your TFS admin wouldn't – James Reed Oct 09 '18 at 13:49
  • Oh I see, I might have heard about this before but forgotten about it. I'll give that a try. Thanks for the tip! – DanDan Oct 09 '18 at 13:56

0 Answers0