When merging changes in the MSVS2013 IDE, is there

2019-07-06 21:29发布

I pressed Alt-E which I mistakenly thought was Merge Changes In Merge Tool, however, that was actually Keep Local Version. Is there a way to go back? Is there a way to find out what was merged, as in what file? Ugh! :(

I have completely stopped working in case I erase something of importance.

I'm using MSVS 2013 Professional.

2条回答
一纸荒年 Trace。
2楼-- · 2019-07-06 22:09

I don't know a great answer to this problem, but I do know one thing you can do (I hope you don't have a massive amount of pending changes, or this will get tedious).

The problem is that TFS thinks you have now merged the server changes (other devs changes) into your workspace, even though you told it to basically toss them. If you try to check-in now it will blow away other developers changes in TFS.

What you can do is go through each file in your pending changes window, and do a Compare With Latest Version. This will show you the differences between your local file, and the file in TFS. You will notice two types of differences:

  • the changes you made which you can just skip past.
  • Changes that other devs made and are on the server, these differences will show up as though you have deleted/undone that code locally

For the changes that other devs made, you will have to manually reapply them in your local workspace before you check-in.

查看更多
Lonely孤独者°
3楼-- · 2019-07-06 22:16

Here's another possible approach.

If you know what version of the code you started with before you started making your current batch of changes, you can grab a copy of your local workspace files. Then Undo all your Pending Changes. Then delete all the files in your local workspace (in Windows explorer). Then do a Get Specific Version to get back the old version of the files from where you started, then copy-paste in your updated files from your backup copy. Then do a Get Latest. This should retrigger the Merge process.

查看更多
登录 后发表回答