git-clean
- Remove untracked files from the working tree
Syntax
git clean
[-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] [<pathspec>]
Example
Use the following command to clean all untracked files and uncommitted code.
Note: This will clean your working tree and remove all new changes in your current branch.
git clean -d -f -f