From: Marcin Wiśnicki Date: Thu, 06 Oct 2011 14:32:39 GMT Subject: Re: List of directories containing only ignored files Message-ID: In-Reply-To: <4E8DB548.5030108@op5.se> 2011/10/6 Andreas Ericsson : > On 10/06/2011 03:56 PM, Marcin Wiśnicki wrote: >> >> Alternatively: how to remove such leftovers when switching branches ? > > git clean -X -f > That also would delete /project1/obj/foo.o which is not what I wanted. Anyway I think I have found the answer: git ls-files -o --directory --exclude-standard