How to revert uncommitted changes including files and folders?

The Solution to How to revert uncommitted changes including files and folders? is


You can run these two commands:

# Revert changes to modified files.
git reset --hard

# Remove all untracked files and directories.
# '-f' is force, '-d' is remove directories.
git clean -fd

~ Answered on 2011-04-28 02:37:48


Most Viewed Questions: