Skip to content

Instantly share code, notes, and snippets.

@dearaujoj
Created December 3, 2012 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dearaujoj/4194257 to your computer and use it in GitHub Desktop.
Save dearaujoj/4194257 to your computer and use it in GitHub Desktop.
git clean command
remove files git clean -f
remove directories, run git clean -f -d.
remove ignored files, run git clean -f -X.
remove ignored as well as non-ignored files, run git clean -f -x.
Note the case difference on the X for the two latter commands.
Unless you specify -f and clean.requireForce is set to "true" (the default) in your configuration, nothing will actually happen, with a recent enough version of git.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment