Use the following commands if you’d like to remove all recent changes made since the last commit.
This command resets the index and working tree. Any changes made to tracked files in the working tree since the last commit are discarded.
git reset --hard
This will recursively remove all files and directories that are not under version control (untracked).
git clean -f -d
-x flag if you want to remove ignored files as well.
git clean -f -d -x