Reputation: 980
I have a project under source control (TFS)
Physical Location
C:\repositry\devRep\application\DevEnv\Test\Project1
TFS location
$/repositry/devRep/application/DevEnv/Test/Project1
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
How i can achieve this?
Kindly note i don't want to lose file change history otherwise i could have followed simple approach by removing and re-adding projects
Upvotes: 2
Views: 3993
Reputation: 4602
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.
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.
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.
Upvotes: 2