Skip to content

Instantly share code, notes, and snippets.

@drobinson
Created August 13, 2013 18:40
Show Gist options
  • Save drobinson/6224257 to your computer and use it in GitHub Desktop.
Save drobinson/6224257 to your computer and use it in GitHub Desktop.
Remove all untracked changes from the current directory - good for package-based installs that have a lot of untracked changes (that you don't need for what you're working on) for some reason or another.
$ git clean -fdn
# -f force (because Obi-Wan says so)
# -d also removes directories
# -n dry run (ALWAYS do this first)
# You can also specify a path, but to be safe I always just cd to where I want to destroy changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment