mid-14c., "condition or relation of being other or different," also "any special mode of non-identity," from Old French difference"difference, distinction; argument, dispute" (12c.) and directly from Latin differentia "diversity, difference," from differentem (nominative differens), present participle of differre "to set apart," from assimilated form of dis- "apart, away from" (see dis-) + ferre "to bear, carry," from PIE root *bher- (1) "to carry." Sense of "controversy, dispute, a quarrel" is from late 14c.
<a href="https://www.etymonline.com/word/diff">Etymology of diff by etymonline</a>
Harper, D. (n.d.). Etymology of diff. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/diff