SyntaxFix
Write A Post
Hire A Developer
Questions
Adding another option here.
I'm referring to the title: Revert local changes. It can also apply to changes that weren't staged for commit.
In this case you can use:
git restore <file>
To go back to previous state.