Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2015 Update 2 Git undo dont work

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

like image 474
McMlok Avatar asked Apr 20 '16 07:04

McMlok


People also ask

How do I Uncommit in Git Visual Studio?

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.

How do I delete a local repository in Visual Studio 2022?

Right-click the project in the Project Explorer panel and then choose Source Control > Delete Repository from the context menu.


1 Answers

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.

like image 141
TTT Avatar answered Oct 16 '22 07:10

TTT