Complete nuke all changes in visual studio and reset from TFS

I am using Visual Studio 2013. As for the TFS workflow, there are problems that I have when working with an error or work item, after I’ve finished, I move the changes to the shelf for further consideration, discarded the changes by right-clicking pending changes and cancellation cancellation. Continue to the next release or improvement. Fields can be filtered out and then applied to any industry they currently need.

The problem is that undoing the visual studio does not completely reset the solution to a completely clean state. Often there are orphaned files or projects that link to nonexistent files or other similar problems. I would like to be able to completely nuke and reset my solutions from the source control, as if I were a new developer, and I did not find a simple solution for this.

Currently, the only way to achieve this is to go to the "Source Control Explorer" to remove the file system association for the project. Go to the file system, delete the folder. Go back to Source Control Explorer to add displays back. And then "Get the latest version."

Is there an easy way to completely solve the reset solution in Visual Studio with TFS?

+5
source share
2 answers

You can achieve this in Visual Studio 2010 without Power Tools. The process is likely similar to other versions of VS.

Open the source explorer. Right-click the entry you want to reset, then select "Get a specific version." Select the version for which you want to reset. Make sure that two checkboxes are checked:

☑ Overwrite recording files that are not unloaded

☑ Overwrite all files, even if the local version matches the specified version

This will overwrite all locally associated files with the server version. (And, accordingly, it takes time proportional to the number of files.) I do not think that this operation will delete any files that are not displayed.

+5
source

If you have Power Tools installed, call tfpt scorch /deletes /recursive /diff . This should make your local folder exactly match the server.

You can also call tfpt treeclean , which simply removes any item that is not visible in TFS. It will not update or replace any modified files, though, like scorch.

+3
source

Source: https://habr.com/ru/post/1206374/


All Articles