5

I have a folder foo that is included in gitignore:

 - .gitignore  (this contains 'foo')
 - foo
    *
    *** bar

When I run git clean -f or git clean -f -x, this does not delete bar (bar is a normal file).

Is there a way to tell git to clean inside ignored folders?

ripper234
  • 222,824
  • 274
  • 634
  • 905

1 Answers1

14

git clean -fdx will delete all untracked files, including directories. The -d is necessary to cause the cleaner to descend into the untracked dir.

Borealid
  • 95,191
  • 9
  • 106
  • 122