git clean -fd
で消えない子達を消す方法。
例
Gitリポジトリの中に別のリポジトリを持ってきていると、git clean -fd
では以下のようになって全ては消せない。
$ git clean -fd
Skipping repository sub-repo/
ありそうな状況としては、submoduleの検討段階とか?
Conclusion
git clean -ffd
で全消しできる。
git clean help を読む
git clean -f
の説明によると、-f
だけだと.git
のあるディレクトリは消さないのでf
2つ付けろと書いてある。
-f, --force
If the Git configuration variable clean.requireForce is not set to false, git clean will refuse to delete files or
directories unless given -f, -n or -i. Git will refuse to delete directories with .git sub directory or file unless a
second -f is given.
参考