2011/10/6 Andreas Ericsson <ae@xxxxxx>: > 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 -- 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