Scenario: after compile, the workspace has some private files. We don’t need these files, and want to go back to the environment when we first clone the repo.
$git clean -dfx # clean all files that are created.
$git checkout -- .# undo all changes in repo files.
Note: use these two commands with care, in case you delete your useful changes in files.