The greek city states never had republics... You are mixing this up with Rome.
That's a matter of definition. The term republic as used by the Romans, res publica, merely refers to affairs handled publicly. In many ways, the Roman system was closely comparable the mixed constitutions present in most Greek city states. (Before the Delian League, at any rate, Athenian style democracy was far less common than mixed constitution systems.) Most of these were outgrowths of competition among elites. Early city states would be headed elders from wealthy landowning families. (Even the term senate, from senex or old man, reflects this--incidentally senile is from the same root as senate.) Popular assemblies would also be used for matters like war and use of public lands. In many cases, nouveau riche from the merchant classes would agitate for change and gradually expand the franchise to increase the number of loyal voting blocks to achieve their ends. The real anomaly is the Athenian system which, under the likes of Pisistratus and Cleisthenes, expanded the franchise to ever greater proportions--and in their own interests--until the people's assembly held most of the power.
The term republic has evolved since that time. If you look at the way it was used in the Renaissance/Early Modern period, it merely meant a constitutional arrangement without a monarch. This is rather closer to the Latin meaning of res publica than the way we use it today. (There's not really an ancient Greek equivalent, though the Greeks freely discussed mixed constitutions composed of democratic, oligarchic, and monarchic elements.) But under the influence first of Anglo-American and then of French systems of representative government, it has come to mean something very different. When we speak of republics these days, we often mean representative systems. But this is one of the (great) innovations that has occurred since parliamentary systems came about in the past millennium. Contrary to popular belief, the Roman Republic was not a representative system. See Polybius, Histories, Book VI if you'd like some details, but the quick and dirty version is this: Romans did elect magistrates for certain positions we would term 'executive.' But all legislative power was vested in an assortment of popular assemblies. The senate was an advisory body made up of former magistrates who'd attained a respectable rank, but it had no direct legislative powers.
In short, the meanings of these words have changed so much that saying the Greeks had no republics but the Romans did requires some parsing. If by republic we mean a representative system, then neither Greeks nor Romans had republics. But if we mean what the Romans meant, then many Greek poleis were republics.