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

十年热恋 提交于 2019-12-07 12:05:00

问题


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.


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/33235338/vs-code-delete-my-unity-project-os-xgit-clean-all

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!