Its original meaning was literal: digging around the roots of a tree, to prepare it for a transplant. Bringing the dirt from the new location, and introducing it to the tree, before the transplant, so the tree can grow accustomed to the new environment before it gets there.