简体   繁体   中英

VS2015: Quick way to switch from diff to original file

Recently we switched to Git and use the integrated Git environment of Visual Studio 2015.

If you view changes to a file via the team explorer, it starts comparing the modified one with the original version. When you're viewing changes in history, you can't modify the file in the diff of course. However, we don't really have a good way of switching to the original file. We discovered setting a breakpoint works sometimes... But mostly we have to close the file opened for comparison and then navigate to the original file. I really have the feeling I'm overlooking something.

So, is there a quick way to switch from the file diff of Visual Studio to the original file being diffed?

PS: I don't know if it's relevant but we're using Resharper.

PPS: I'm using Jetbrains Rider for a few years now where I can just press F4 and it opens the original file and places the cursor at the right place as well.

您可以使用Shift + Alt + L导航到解决方案资源管理器中的文件,然后按 Enter 打开您正在比较的文件。

Sorry if IDE is not relevant, but for someone it still could be helpful

I'm using Visual Studio 2022 and this combination works for me:

  1. Ctrl + Alt + L to open Solution Explorer on respective file
  2. Enter to open the file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM