[Middle English dite, a literary composition, from Old French dite, from Latin dictātum, thing dictated, from neuter past participle of dictāre, to dictate, frequentative of dīcere, to say; see deik- in Indo-European roots.]
c.1300, from O.Fr. ditie "composition, poem, treatise," from L. dictatum "thing dictated," neut. pp. of dictare "dictate." Ditty bag is 1850s nautical slang, perhaps from Brit. naval phrase commodity bag.