Best thing to do is run your hands under hot water for a little while(throw some soap on too,so your guitar dosn't get grimy)and warm up properly.If your doing something and it hurts DON'T work through the pain,take it easy and relax your hand.
Theres something for everyone out there....writers cramp,tennis elbow e.c.t.You just have to take precaution and know when your body says enough is enough.
Try once,fail twice...