No real way to totally avoid it, but if you keep your chain clean that will help. Just wipe it with a rag before and after each ride.
There more labor-intensive efforts that would help, such as removing your chain, soaking it in solvent of some type to clean it out, then using something like a wax- or teflon-based lube, but that's probably overkill, and even then you'd still wind up with chain grease.
Bottom line is don't wear anything that you can't have wind up with a chain or chain-ring tattoo on.