I'm a bit new at this, so bear with me.
I saved a .js file in my user just so I could run it's output in Terminal. This file appears to have created changes in all my projects. I feel a bit foolish.
How can I discard all these changes at once? I tried doing this in VS Code, but when I click the Discard All Changes option, VS Code says that might delete one or more files (see attached screenshot). Naturally, I feel this might be a bad idea.
Then I tried get reset--hard
, git checkout -f
, and git reset --hard HEAD^
on my user through command lines in Terminal, but I always get the same error message:
fatal: not a git repository (or any of the parent directories): .git
I don't know how to now get around the issue.
You can find images of the problem attached:
File changes and terminal message
VS Code message with all files which will be deleted if I discard changes
Thank you in advance for any and all help!