Discard untracked changes

Isabelle Viktoria Maciohsek · Git, Branch · Apr 13, 2021

Discards all untracked changes to the current branch.

  • Use git clean -f -d to discard all untracked changes to the current branch.
git clean -f -d
git clean -f -d
# Discards all untracked changes

Recommended snippets