Dig
Middle English: perhaps from Old English dīc ‘ditch’.
wiktionary
From Middle English diggen(“to dig”), alteration of Old English dīcian(“to dig a ditch, to mound up earth”) (compare Old English dīcere(“digger”)) from dīc, dīċ(“dike, ditch”) from Proto-Germanic *dīkaz, *dīkiją(“pool, puddle”), from Proto-Indo-European *dʰīgʷ-, *dʰeygʷ-(“to stab, dig”). Additionally, Middle English diggen may derive from an unrecorded suffixed variant, *dīcgian. Akin to Danish dige(“to dig, raise a dike”), Swedish dika(“to dig ditches”). Related to Middle French diguer(“to dig”), from Old French dikier, itself a borrowing of the same Germanic root (from Middle Dutch dijc). More at ditch, dike.
From African American Vernacular English; due to lack of writing of slave speech, etymology is difficult to trace, but it has been suggested that it is from Wolof dëgg, dëgga(“to understand, to appreciate”). [1] It has also been suggested that it is from Irish dtuig. [2] Others do not propose a distinct etymology, instead considering this a semantic shift of the existing English term (compare dig in/dig into). [3]
Shortening.
etymonline
dig (v.)
c. 1200, diggen, "to make a ditch or other excavation," a word of uncertain origin, perhaps related to dike and ditch, either via Anglo-French diguer, from Old French digue "dike" (which is ultimately from Proto-Germanic *dīk-, from PIE root *dheigw- "to stick, fix") or directly from an unrecorded Old English verb. The older native words were deolfan (see delve), grafan (see grave (v.)).
Transitive meanings "form by excavation, make by digging," also "obtain or remove by excavation" are from late 14c.; figurative sense of "discover by effort or search" is from early 15c. Meaning "to penetrate" is from mid-15c.; transitive sense of "cause to penetrate, thrust or force in" is by 1885.
In 19c. U.S. student slang it meant "study hard, give much time to study" (1827); the 20c. slang sense of "understand" is recorded by 1934 in African-American vernacular. Both probably are based on the notion of "excavate." A slightly varied sense of "appreciate" emerged by 1939. The strong past participle dug appeared in 16c. but is not etymological.
dig (n.)
late 17c., "a tool for digging," from dig (v.). Meaning "archaeological expedition" is from 1896. Meaning "a thrust or poke" (as with an elbow) is from 1819; figurative sense of this is by 1840.