What does git clean -fd do?

Git Medium

Git — Medium

What does git clean -fd do?

Key points

  • Git clean targets the working directory
  • -f and -d flags specify removal scope
  • Untracked files and directories are affected
  • Staged changes and commit history remain intact

Ready to go further?

Related questions