xxxxxxxxxx
# Discarding local changes (permanently) to a file:
git checkout -- <file>
# Discard all local changes to all files permanently:
git reset --hard
xxxxxxxxxx
git clean -dxn . # dry-run to inspect the list of files-to-be-removed
git clean -dxf . # REMOVE ignored/untracked files (in the current directory)
git checkout -- . # ERASE changes in tracked files (in the current directory)
xxxxxxxxxx
Undoing the changes in the working directory
Use the checkout command in order to checkout the repository’s version.
RUN:
git checkout hello.html