I suppose git's tree objects could point to the empty tree to record an empty folder, but most of the git code is comparing file blobs not trees.
How do you get around this in mercurial?
Same (with a .empty or .keep file).