I am using Visual Studio 2019 Community and accidentally clicked in undo changes in the Team Explorer tab for all the files staged and lost all my last days work.
If you are sure that you have staged your files, the recovery of files content is possible, even if painful! For the file names, the data is lost, due to how git works (i.e. when you stage files, only blob objects are created and stored in git data store but not filetree objects --that stores the matching between content and filename).
If you have not staged your files, all is lost.
Otherwise, download and install Git Extensions.
Then, once your repository is opened in GitExtensions, go to the menu item:
"Repository" -> "Git Maintenance" -> "Recover lost objects"...
There, uncheck "Show commits and tags" (that will check "Show other objects")
Now, when you double-click on a line, you should be able to get the content of the files created from the more recent to the oldest.
Good luck!!
lost all my last days work.
PS: for the future, you just learned the hard way that with git you must commit often (you will always be able to recover once your work is committed). And after that, learn how to rewrite your history or to amend the last commit. Learn how to use the reflog
also
Other ways to recover staged files in another Stackoverflow question (using the command line): https://mcmap.net/q/12488/-in-git-how-can-i-recover-a-staged-file-that-was-reverted-prior-to-committing