1620s, "in the month of the same name," Tuscan dialectal ditto "(in) the said (month or year)," literary Italian detto, past participle of dire "to say," from Latin dicere "speak, tell, say" (from PIE root *deik- "to show," also "pronounce solemnly").
Italian used the word to avoid repetition of month names in a series of dates, and in this sense it was picked up in English. Its generalized meaning of "the aforesaid, the same thing, same as above" is attested in English by 1670s. In early 19c. a suit of men's clothes of the same color and material through was ditto or dittoes (1755). Dittohead, self-description of followers of U.S. radio personality Rush Limbaugh, attested by 1995. dittoship is from 1869.