Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save devinschumacher/adf842349dd5145edaa19315987ae344 to your computer and use it in GitHub Desktop.

Select an option

Save devinschumacher/adf842349dd5145edaa19315987ae344 to your computer and use it in GitHub Desktop.
How to Remove (Delete) all UNTRACKED Files in Git
title How to Remove (Delete) all UNTRACKED Files in Git
tags
git
git clean
untracked files

How to Remove (Delete) all UNTRACKED Files in Git

When you add files to a repository, and have no yet STAGED them (ie: run git add) they will be 'untracked'.

  1. Add a file named asdfasdf.md
  2. Run git status
image

If you don't want to save the files, you can remove them using git clean

git clean -f .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment