Perhaps because the shirts of a hundred years ago were not Sanforized and, therefore, the American male was likely to be hampered in the free movement of his arms, it was his custom, whenever a fight seemed imminent in settling an argument, to remove his shirt first, and thus be ready to wade in with both fists flailing.
The opponent, however, might see that there were two sides to the matter under debate; therefore, that it would not be necessary to resort to fisticuffs.
Accordingly, his admonition would be, “Now, just keep your shirt on.”
At least, such is still the meaning, avoid becoming excited or angry; keep calm, cool, and collected, and was when George W. Harris in The Spirit of the Times (1854) wrote, “I say, you durned ash cats, just keep yer shirts on, will ye?”