Yup, I'm that idiot. But I did select only the files I wanted to undo in the Pending Changes panel. It opened a new dialog, which I wrongfully assumed only contained the selection I made in the main panel. I said to undo everything and presto! a bunch of stuff I didn't want to undo was undone (much like the sweater song. I'm a tool). So my question is: is there anyway to recover the work that I undid?
Visual Studio supports discarding uncommitted changes to a file by reverting the file to its last committed version. If the file is in the Changes section, right-click it and choose Undo Changes to discard all changes to the file since the last commit.
You can also specify if you want to restore modified files if Visual Studio shuts down unexpectedly. To access this dialog box, go to Tools > Options > Environment > AutoRecover.
You can open the Pending Changes window by right-clicking the Visual Studio project or solution file and then choosing "Git (master)" followed by "Pending Changes". Again, just like before, select the files you want to include, add a meaningful comment and commit them.
I did exactly same thing. Fortunately I had realized that before I rebuilt the project. I used Telerik JustDecompile to get my lost code from the assembly.
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