Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undo/Redo Conflict Resolution action in TFS

Is there a way to undo/redo a conflict resolution in VS2013/TFS?

Accidentally clicked "Use Local Changes" when really meant to do "Resolve Conflicts". Since "Use Local Changes" was clicked the changes are all intact. Is there a way to force VS2013/TFS to resolve conflicts again so this time we can merge?

like image 796
Denis Avatar asked May 19 '14 15:05

Denis


People also ask

How do you revert conflict?

On the command line, a simple "git merge --abort" will do this for you. In case you've made a mistake while resolving a conflict and realize this only after completing the merge, you can still easily undo it: just roll back to the commit before the merge happened with "git reset --hard " and start over again.

How do I fix conflicts in TFS?

To show all conflicts in your workspace, choose Get All Conflicts. A message that begins with: n Conflict(s) appears. If a lot of time has passed since you made changes to files in your workspace, new conflicts might have occurred. To refresh the Resolve Conflicts window, choose Refresh.


2 Answers

  1. Shelve all the changes
  2. Undo checkout all changes
  3. Unshelve your Shelveset.

The dialog to resolve conflict will appear when you try to check-in

like image 92
Hamid Shahid Avatar answered Oct 01 '22 15:10

Hamid Shahid


Assuming you have no other pending changes than the merge (always check in or shelve any pending changes before you do a merge), you can either undo all changes and do the merge again, or undo the changes of a single file and just merge that file. Do to the latter:

  1. Undo the pending change in your target branch
  2. Locate the file in your source branch and select merge...
  3. Select the same file in your target branch
  4. Redo the conflict resolution
like image 44
Fredrik Avatar answered Oct 01 '22 15:10

Fredrik