git
Npm Discard All Changes

git discard all changes files + folders

If like me always forget simple but important git commands

Discard all untracked files in the current directory and subdirectories:

git clean -f .

Revert all changes in tracked files (staged or unstaged) to the last committed state but often fail for subfolders:

git checkout -- .

Alternative to ensure all changes are reset:

git reset --hard
Last updated on