# 1. 'f'orce checkout 'a'll paths from the index (staged/added files) to the
# working tree (local file system)
git checkout-index -fa
# 2. 'f'orce clean (remove) all files and 'd'irectories which are in the working
# tree but NOT in the index. WARNING WARNING WARNING: this is a destructive
# command and cannot be undone. It is like doing `rm` to remove files.
# First, make sure no changes exist in red when you run `git status` which
# you want to keep.
git clean -fd
来自 man git checkout-index:
-f, --force
forces overwrite of existing files
-a, --all
checks out all files in the index. Cannot be used together with
explicit filenames.