将项目(在源代码管理下)移动到其他文件夹 [英] Moving project (under source control) to different folder
问题描述
我有一个受源代码管理(TFS)控制的项目
I have a project under source control (TFS)
物理位置
C:\repositry\devRep\application\DevEnv\Test\Project1
TFS位置
$/repositry/devRep/application/DevEnv/Test/Project1
我想将这个项目从物理上和在TFS中都升级到一个新的水平.
All i want to move this project to one level up both physically and in TFS.
C:\repositry\devRep\application\DevEnv\Project1
$/repositry/devRep/application/DevEnv/Project1
我该如何实现?
请注意,我不想丢失文件更改历史记录,否则我可以按照简单的方法删除并重新添加项目
Kindly note i don't want to lose file change history otherwise i could have followed simple approach by removing and re-adding projects
推荐答案
在Source Control Explorer中,右键单击Project1文件夹,然后选择 Move .在对话框中,删除名称的 Test/部分,然后单击确定".如果项目包含在解决方案中,则需要在解决方案资源管理器中删除/重新添加该项目.最后,您通过待更改"进行提交.
In Source Control Explorer right click the Project1 folder and select Move. In the dialog delete the Test/ part of the name and hit OK. If the project is included in a solution you need to remove/re-add the project in the Solution Explorer. Finally, you commit through Pending Changes.
更改历史记录不会丢失,但是TFS/VS在如何显示重命名/移动文件夹的历史记录方面存在局限性.对于单个文件,您可以查看重命名/移动前后的完整历史记录.对于文件夹,您只会看到历史记录回到上一次重命名/移动的位置,但是将历史记录"窗口顶部的源位置编辑为旧名称($/repository/NameBeforeRename)将显示给您它具有该名称时所做的更改.
Change history won't be lost, but TFS/VS has a limitation in how it displays history for renamed/moved folders. For a single file you can see the full history before and after the rename/move. For a folder you will only see the history back to the last rename/move, but editing the Source location in the top of the History window to the old name ($/repository/NameBeforeRename) will show you the changes that were done while it had that name.
根据您的工作区映射,您可能需要更新这些映射.如果将$/映射到c:\,则无需执行任何操作,而如果将$/repository/devRep/application/DevEnv/Test/Project1专门映射到C:\ repositry \ devRep \ application \ DevEnv \Test \ Project1,然后您需要使用管理工作区"对话框来更新它.
Depending on your workspace mappings you might need to update these. If you mapped $/ to c:\ then you don't need to do anything, whereas if you have mapped $/repositry/devRep/application/DevEnv/Test/Project1 specifically to C:\repositry\devRep\application\DevEnv\Test\Project1 then you need to update this using the Manage Workspaces dialog.
这篇关于将项目(在源代码管理下)移动到其他文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!