The idiom cover all the bases means (1) to prepare for every possibility, (2) to give attention to every aspect of a situation or problem, or (3) to inform (someone) of all matters at hand.
The origins of cover all the bases are not definitively established. What we do know is that it came about in the early to middle 20th century, and that it is likely American in origin. Beyond that, there are two possibilities. First, the prevailing theory is that the idiom comes from baseball, where defensive positioning involves having players near all the bases. For the idiom to spring from this would be somewhat illogical as covering the bases in baseball is routine, while covering all bases in the metaphorical sense usually involves going beyond routine to be extra careful.
The second possibility is that the idiom has military origins. The phrase appears to have arisen during or soon after the second world war—that incubator of new words and expressions—and the word bases likely had strong military associations in people’s minds. Plus, in historical searches of cover all the bases and variants of that phrase from before 1960, we find only a few instances related to baseball. Most refer to military matters during the two world wars and the Cold War. And if the phrase were from baseball, it would be strange that the metaphorical sense was never used before the second world war, especially since baseball had been a popular American sport since the late 19th century.
In any case, the earliest examples of the phrase used metaphorically (that we can find—please comment if you have any to add) are from the 1950s, and it was not widespread until the 1960s. In historical Google Books and Google News searches, the earliest available example of cover all the bases or any close variation is from a 1952 article in Billboard magazine, and the second is from 1957 (see below for these examples). These writers use cover all the bases casually and without elaboration, though, so these are certainly not the earliest instances of the idiom.
Here are a few early instances of the phrase used in its modern idiomatic sense:
Desi Arnaz and I work very closely on all the production phases of “I Love Lucy” and we still don’t have enough time in a week to cover all the bases. [Billboard (1952)]
His job is to cover all bases with liberal senators. [Ocala Star-Banner (1957)]
[T]hey admit now it won’t be a shoo-in, that they will have to cover all the bases. [quoted from speech in The Telegraph-Herald (Dubuque, Iowa) (1959)]
And here are a few 21st-century examples:
Though Gold is an optimist, he is careful to cover all his bases. [New York Times]
The quickest way to cover all the bases, however, is to buy a decent bottle of the three “white liquors”—vodka, rum, and gin. [NorthJersey.com]
Of course, they also make pizza with topping options that cover all the bases. [Prescott Daily Courier]
There’s a lot … to chew over – and we only have 15 minutes to cover the bases. [Guardian]