I was working on a git branch and was ready to commit my changes, so I made a commit with a useful commit message. I then absentmindedly made minor changes to the code that
git checkout -f your_branch_name
if you have troubles reverting changes:
git checkout .
if you want to remove untracked directories and files:
git clean -fd