Kris
Kris

Reputation: 41837

How to partially undo a TFS checkin across multiple solutions

A while ago, I accidentally checked in some unfinished unittest files I had changed and added in solution A together with some files that contained an actual bugfix for project B.

For some unknown reason I never noticed the checkin was going to include files from another solution so the checkin was done, after which other team members added more checkins to both solutions.

My question now is two-fold;

Upvotes: 1

Views: 345

Answers (1)

Isaiah4110
Isaiah4110

Reputation: 10090

I think the easiest solution would be to use the ROLLBACK command, if you have installed the TFS power tools (TFPT) you should be able to do it within visual studio.

  1. In your current branch, get the latest version from server then view history and find your changeset. Then right click and select "Rollback entire change set".

enter image description here

  1. This will rollback the changes in your local workspace and checkout the file. (If there are conflicting changes you will have to resolve conflicts.)

  2. Now when you are ready to check-in, exclude/undo the files which you don't want to rollback.

  3. Commit/checkin the files which you want to rollback.

I haven't seen a better way of doing this, and think that this is much better than individually rolling back each file in the change set.

Now to answer your second question: check this ANSWER which I wrote a while back. I am copying it here for convenience.

As far as I tested, this default setting is controlled by the following registry entry. If the value of this registry entry is set as 1, then it should change the default behavior to filter by "Solution Changes".

"HKCU\Software\Microsoft\VisualStudio\12.0\TeamFoundation\SourceControl"

Name: FilterPendingChanges REG_DWORD

Value: 1 = Show Solution Changes

Value: 0 = Show All

Upvotes: 1

Related Questions