Git 2 · Undoing changes

Delete untracked files

Remove untracked files and folders.

git clean -fd

Caution: Deleted untracked files are not recoverable. Preview with git clean -nd first.

Official Git 2 documentation

More undoing changes commands

All undoing changes commands · Git 2 cheatsheet

Was this page helpful?