Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS code Delete my Unity project (OS X)(git clean all)

I don't use git but Visual Studio Code has a git icon. So I clicked 'clean all' then my unity project has been deleted.

How can I get my project back?

I'm using OS X.

like image 506
Magris Avatar asked Dec 06 '22 20:12

Magris


2 Answers

You can't get it back using git or Visual Studio Code. May be OSX can help you to restore the files (for example via Time Machine).

Short explanation of what you have done:

  • You opened a folder (which was not a git repository).
  • You clicked on the git icon in the menu bar on the left side
  • As the opened directory wasn't a git repository there was only the option "Init git repository" that you clicked on.
  • A list of files appeared and they were all unstaged (that means they weren't already part of the source control)
  • You clicked in the menu on Clean all.
  • A message box appeared displaying the text:

    Are you sure you want to clean all changes?
    
    This action is irreversible!
    
    There are unstaged changes in X files.
    
  • You submitted the message box by hitting "Clean Changes". That deleted all the files in the folder.

like image 170
Wosi Avatar answered Dec 22 '22 03:12

Wosi


I had the same issue. I was able to restore via time machine - otherwise it deleted every file off of my macbook. I'll admit i'm a noob, but having that git icon with a 5,000 notification

like image 37
Michael Cervoni Avatar answered Dec 22 '22 02:12

Michael Cervoni