git clean

Remove untracked files from the working tree

Cleans the working tree by recursively removing files that are not under version control, starting from the current directory.

Normally, only files unknown to Git are removed, but if the -x option is specified, ignored files are also removed. This can, for example, be useful to remove all build products.

How-tos using git clean

Last modified on November 30, 2021.

Can't find a solution to your git problem?

Contact us on githint@githint.com and we will add the solution to the site