← TechnologyThe essentials of

Git clean -n: inspect the list before cleanup

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 16:11 · Updated: 22 Oct 2026 16:11

AI source check: 22 Oct 2026 14:04. This is not editorial approval.

In a few sentences

In brief

git clean targets untracked files. The -n option shows what would be removed without deleting it.

Useful to know

git clean targets untracked files. The -n option shows what would be removed without deleting it. [1]

This differs from reverting edits in a tracked file. Exports and local settings may have no recoverable Git copy. Review the exact scope rather than including ignored files merely to make every working-tree entry disappear.

Sources

For further detail and to check the information:

  1. [1] Git - git-clean Documentation ↗