The military in Istanbul was defeated by.... police and civilians?
How?
Coups typically do not involve everyone in fact usually only a tiny minority of the military would know ahead of time. Got to keep it secret and all that, you depend on everyone kind of going along with you on the day.
Should have come to Nigeria for training we experts at coup plotting.
Big mistake not taking over popular means of communication and allowing the person you want to overthrow access to channels of mass communication.
You need balls of steel to carry out a coup and IMO its sheer lunacy to carry out a coup in a relatively stable, economically vibrant Turkey.