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.
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:
unstaged
(that means they weren't already part of the source control)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.