I'm starting to use Visual Studio (2010) after years with Eclipse.
Every now and then I've found Eclipse's "Revert" feature pretty useful, that is, to reload the file from disk, discarding all changes. (Nothing to do with version control reverting.)
How can I do this with Visual Studio? Should be pretty simple but I haven't found it yet.
I know that I can do this with "undo until *-indicator disappears" but that's pretty impractical.
When you want to discard any modified files/folders, right click on them under Solution Explorer. From the context menu, select Source Control | Undo Pending Changes..., as shown in the following screenshot: Make sure to double confirm whether you really want to undo the file/folder.
In Solution Explorer, select the projects you want to load (press Ctrl while clicking to select more than one project), and then right-click on the project and choose Reload Project. Visual Studio will remember which projects are loaded the next time you open the solution locally.
Choose Refresh from the Window menu, or click the Refresh button in the toolbar.
In the current version, you find in the Explorer, in the left sidebar. Then Open Editors, and right click on the file you want to revert.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With