I update my VisualStudio 2015 to Update 2 and now I can't undo my local changes with project on TFS git repository. When I click to Undo from menu and confirm undo nothing happens. In Source Control output window it says undo was completed successfully. When I open Git CMD and did same think file was undoing and in VisualStudio I see lock flag before file.
Does anybody know what is wrong?
Thanks
The original commit is still in the Git history. To do the same in Visual Studio, right-click the commit you want to revert and then select Revert. After you confirm your action and the operation is complete, Visual Studio displays a success message and a new commit appears in the Outgoing section.
Right-click the project in the Project Explorer panel and then choose Source Control > Delete Repository from the context menu.
I'm fairly certain this is a bug in Visual Studio 2015 (at least Update 2). Fortunately there is an easy workaround: after attempting the undo and seeing the files remain, simply "stage" the files you are trying to undo, and then they should disappear from the list of changes as expected.
Update: I just had a similar issue with 2017 (v15.8.3) where thousands of files were stuck under "Changes" even though they were unmodified. Staging them all fixed the issue and only the truly modified files were staged.
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