revert uncommitted changes including files and folders
# Revert changes to modified files
git reset --hard# Revert changes of a single file
git checkout HEAD -- my-file.txt
# Remove all untracked files and directories. (`-f` is `force`, `-d` is `remove directories`)
git clean -fd
force local repo to be exactly the same with upstream
# this makes repo exactly the same as upstream: your commits will be eaten!
git fetch upstream
git reset --hard upstream/master
git push origin master --force