On Mon, Dec 10, 2012 at 10:03:28AM -0800, Junio C Hamano wrote: > Soren Brinkmann <soren.brinkmann@xxxxxxxxxx> writes: > > >> > Use git clean --force --force to delete all untracked git repositories > >> > >> But I am not sure if this is ever sane. Especially the one that > >> removes an embedded repository is suspicious. "git clean" should > >> not ever touch it with or without --superforce or any other command. > > As I mentioned in my email where I reported this incorrect git clean output, I > > have a use case where I want git clean to remove embedded repositories. > > Whether it is a sane one is probably a different discussion. > > Why is it a different discussion? If something is not sane, the > tool shouldn't encourage users to do such an insane thing. > Well, ok. So I have a repository which essentially consists of a bunch of scripts which then pull sources via git to build root filesystems, busybox, kernel etc. So I have the master repository I'm actually interested in. And then all the other projects which are pulled in to build stuff from. looking somehow like this: top.git |-src | |-proj1.git | |-proj2.git | |-projn.git |-build |-proj1 |-proj2 ... Since the scripts are not perfect I usually used 'git clean -xdf' to wipe everything and build from scratch. And I had to experience that the git clean behavior somehow changed recently and the 'projn.git' directories were no longer removed anymore, despite git indicating otherwise in its output. So, I think having 'git clean -ff' removing embedded git repos is okay. But either way, the output of git clean should match what it is doing. And at least tell me if it didn't remove certain dirs or files. Soren -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html