1640s, "a quick, pertinent, witty remark," from French repartie "an answering blow or thrust" (originally a fencing term), noun use of fem. past participle of Old French repartir "to reply promptly, start out again," from re- "back" (see re-) + partir "to divide, separate, set out," from Latin partiri "to share, part, distribute, divide," from pars "a part, piece, a share" (from PIE root *pere- (2) "to grant, allot").
In 17c. often spelled reparty (see -ee). Meaning "a series of sharp rejoinders exchanged; such replies collectively; the kind of wit involved in making them" is by 1680s.