2

I'm using Visual Studio 2015 and Git.

I added a new file to the project (For example: Test.cs) and it was not committed to GitHub yet. What happens if I undo all my changes? Does VS delete my file? if so is there any ways to recover that deleted file?

I used a recovery tools that like Reflector and other tools but didn't help me.

This answers didn't help:

Is there any other ways to solve this problem?

Community
  • 1
  • 1
Ahror Kayumov
  • 433
  • 4
  • 18
  • 2
    Undoing changes is pretty permanent as explained in the questions you link to. You might have some luck with filesystem recovery tools. If you want any chance at recovering the file, don't touch the machine anymore and download the recovery tools on another machine. - That's for TFS though. Git [may store some history on the file in the index](http://stackoverflow.com/questions/1108853/recovering-added-file-after-doing-git-reset-hard-head). – CodeCaster Mar 15 '16 at 10:06
  • if you can't use the methods in the questions you linked and you didn't keep any backups, then no. This is why you commit early and commit often. – user1666620 Mar 15 '16 at 10:06

1 Answers1

2

There is no supported option for recovering changes after undoing pending changes. A file system recovery is likely your only option but is a long shot.

chief7
  • 14,263
  • 14
  • 47
  • 80