Answer the question
In order to leave comments, you need to log in
Initializing git. Get back deleted files?
I wrote a bunch of code with folders and files, then I decided to initialize the project using the git code built into visual studio and accidentally clicked "revert all changes" instead of commit and everything that was in the project disappeared. Tell me how to return all files before git initialization?
Answer the question
In order to leave comments, you need to log in
If you canceled uncommitted changes, then nothing.
VS created a repository, it is empty, this is its first initial state, then changes were added there, then without committing the changes, these changes were canceled. Git only knows committed states, which is why it rolled back to the nearest one, an empty project.
But you can’t accidentally cancel the changes, you need to press the confirmation button.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question