To get by heart

to commit to memory.

See also: Get

Webster's Revised Unabridged Dictionary, published 1913 by G. & C. Merriam Co.