Reset all changes for a subfolder for a GIT project:
git checkout .
git clean -fd
The last command cleans everything untracked, and the parameters are for:
f – cleans untracked files
d – cleans untrack directories
x – cleans ignored files (specify it ONLY if you intend that)
An alternative to the first two commands would be
Note 1: Credits go to StackOverflow, IT blogs and alike, sites that helped me with the code when searching for solutions.
Note 2: Be aware that when copy-pasting, the quotes and possibly other characters get messed up by WordPress, you’ll have to replace them.