← Learn
Dangerous
git clean -xfd

cross-platform · bash · Intermediate

Deletes every untracked and ignored file in the working tree, which typically includes .env files, local certificates, and uncommitted scratch work. The flags read as innocuous letters, but -x specifically removes the ignored files that were never backed up anywhere.

Signals to notice

  • -x removes ignored files such as .env
  • -f forces deletion without prompting
  • Nothing removed is recoverable from git

Think you can spot these under time pressure?

Start Training

More Git / Development