Moving multiple files in TFS Source Control

前端 未结 4 1950
猫巷女王i
猫巷女王i 2021-01-29 21:19

I\'m using Team Foundation Server 2008 (SP 1) and I need to move multiple files from one folder to another (to retain file history). In addition to Team Explorer (with SP 1) I\

相关标签:
4条回答
  • 2021-01-29 21:42

    Stick all the files that you wish to move, under a folder and then move that folder.

    0 讨论(0)
  • 2021-01-29 21:48

    Use the tf.exe tool from the Visual studio commandline - it can handle wildcards:

    tf.exe move <olditem> <newitem>
    

    Example:

    tf.exe move "$/My Project/V*" "$/My Project/Archive"
    

    [EDIT] As noted in the comments: move is an alias for rename. Both commands move history.

    0 讨论(0)
  • 2021-01-29 21:53

    Use rename instead of move

    tf.exe rename "$/PROJECT/SharedLibs/Log4Net/*.*" "$/PROJECT/SharedLibs/3rdParty/"
    tf.exe rename "$/PROJECT/SharedLibs/ZipLib/*.*" "$/PROJECT/SharedLibs/3rdParty/"
    

    Check it out the help documentation: TFS Command Line Reference

    0 讨论(0)
  • 2021-01-29 22:01

    Holan Jan has written a Visual Studio Extension which provides 'move' for multiple files within source control explorer (i.e. using a GUI) Works a treat, also has support for recent versions.

    for VS2019 : https://marketplace.visualstudio.com/items?itemName=HolanJan.TFSSourceControlExplorerExtension-2019

    for VS2017 : https://marketplace.visualstudio.com/items?itemName=HolanJan.TFSSourceControlExplorerExtension-18397

    for VS2015 : https://marketplace.visualstudio.com/items?itemName=HolanJan.TFSSourceControlExplorerExtension-13343

    for VS2013 : https://marketplace.visualstudio.com/items?itemName=HolanJan.TFSSourceControlExplorerExtension-11508

    for VS2012 : https://marketplace.visualstudio.com/items?itemName=HolanJan.TFSSourceControlExplorerExtension-8896

    Under the hood it does use the same commands mentioned above but it's just a bit friendlier to use. Each of the versions listed require RTM version of Visual Studio.

    0 讨论(0)
提交回复
热议问题