The phrase 'to keep yopur shirt on', meant to keep your temper under control, whereas to 'have your shirt out' - presumably outside your trousers - meant you had lost your temper. Hence, shirty = cross/angry.
The idea behind it all is, I daresay, a bit like taking your jacket off if you were about to get into a fight.
Entirely like taking your jacket off if you were about to get into a fight, I should say. Punchy types probably didn't even have jackets on, and did not demur to reveal their muscle vests, or failing that, (gasp) their bare chests.
Even 'keep your hair on' probably means refraining from whipping your wig off to get stuck in, thus in all probability precipitating a mass exodus from the pub to join the fray, as in 'wigs on the green'.