Skip to content

Instantly share code, notes, and snippets.

@begin29
Created February 9, 2017 08:14
Show Gist options
  • Save begin29/34923d66b6a0c25fbd215cfed630ec1e to your computer and use it in GitHub Desktop.
Save begin29/34923d66b6a0c25fbd215cfed630ec1e to your computer and use it in GitHub Desktop.
git remove untraked files
# show files that will be removed
git clean -n
# remove files
git clean -f
#To remove directories, run
git clean -f -d #or git clean -fd
#To remove ignored files, run
git clean -f -X #or git clean -fX
#To remove ignored and non-ignored files, run
git clean -f -x #or git clean -fx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment