Reputation: 542
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.
Upvotes: 3
Views: 395
Reputation: 57
Ctrl+W works to go from Diff back to original
While the other Ctrl+Alt+L/Enter also works, for me it felt like a lot of keys so I kept looking and found the solution here:
Upvotes: 0
Reputation: 7103
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:
Solution Explorer
on respective fileUpvotes: 1
Reputation: 388
You can use Shift + Alt + L to navigate to the file in solution explorer then hit enter to open the file you were diffing.
Upvotes: 2