Rollback a single file in TFS

If I view the history of a single file in source control I can right hand click a change-set in the list and choose "rollback back entire change-set".

Will this rollback all the other files I checked in during that checkin or just the file I am currently viewing? If it does rollback all files is there a way to rollback just the file selected?

Thanks


Solution 1:

As previously mentioned, rolling back the changeset rolls it back in its entirety.

Installing Team Foundation Power Tools (which I think pretty much everyone should install) gives you another option: If you want to rollback a single file, you can right click a single file in the Source Control Explorer and select Rollback...

Solution 2:

Yes, rolling back the entire changeset will roll back all the changes in it.

However, a Rollback is not instant, when you click that option the rollback will be perform a reverse merge and leave the changes in your workspace. So you can look at them in Pending Changes.

In your case, just perform the Rollback and then undo everything except the file you actually want to Rollback.