1
votes

We are using Team Foundation Server as source code management tool.
I've checked a source file out and done some changes while other developers have checked in theirs.
Then I've got latest version of that file so TFS asked me to solve the conflict and I've wrongly chosen to "keep local changes". The right choice would have been to merge the differences.
Now for TFS the conflict is resolved and I can't rollback the choice I've done as a mistake.
If I choose the "Undo pending changes" then I'll lose all my local changes.
If I get latest version again TFS says that "All files are up to date".
How can I go back and make TFS ask me to resolve the conflict again?

Thanks.

UPDATE

I've just tried the second suggestion of Dylan Smith and did the following steps.
1) Looked at the workspace changeset number of the file
2) Made a backup copy of the file
3) Made the "undo pending changes"
4) Deleted the file from its folder
5) Got the specific version by changeset previously noted
6) Overwrote the file with the backup copy (that was writable)
7) Got latest version of the file
8) Chose the "Checkout file and automerge" option.
The final result was TFS triggering this error message : "Error The following exception was encountered. Program.cs cannot be merged. Please retry with another resolution option."

2

2 Answers

0
votes

I see only one way because your local changes are not saved anywhere on its own:

Save your local files to a different directory and undo your pending changes. Run a diff, do your changes again, and check in.

0
votes

Here's a similar question: When merging changes in the MSVS2013 IDE, is there a log of what occurred?

My 2 suggestions there were:

  1. Use the Compare with latest and manually identify lost changes
  2. Revert local workspace and reapply pending changes.