Junio C Hamano <gitster@xxxxxxxxx> writes: > Actually that will break the case of removing foo/bar, which is > the only file in directory foo, and creating a new file foo. Sorry. The creation codepath already has enough code to remove the left-over directory foo/ when creating the file foo. I think your three-step process should be Ok. - 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